package com.whut.monitor.util;

import com.whut.monitor.websocket.PollWebSocketServlet;
import io.netty.channel.ChannelHandlerContext;
import org.apache.commons.lang.StringUtils;

import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.*;

import static com.whut.monitor.util.DateUtil.getNowTimeS;
import static com.whut.monitor.util.InitUtil.DS18B20IdMap;
import static com.whut.monitor.util.InitUtil.FGBtoSSTSFTIdMap;
import static com.whut.monitor.util.SensorUtil.virtualCNCDataSDTaddSFT;
import static com.whut.monitor.util.SystemUtil.isWindows;
import static com.whut.monitor.util.WuzhongUtil.fileSavePath;

/**
 * 数据包协议解析相关工具
 *
 * @author Sandeepin
 */
public class ProtocolUtil {

    // 【选择代码调试模式】
    // 测试模式，不存Hbase，邮件特殊提示
    public static boolean TestMode = true;
    // 服务器上使用模式，真写HBase
//	public static boolean TestMode = false;

    // 标定Map是否初始化标志
    public static boolean isInit = false;
    // 是否发送邮件通知标志
    public static boolean alreadySendMail;
    // 武重机床部署的FBG标定信息
    public static Map<String, Double> IdWaveMap = new HashMap<>();

    public static Map<String, String> FGBtoSSTSFTMap = new HashMap<>();
    // 武重机床部署的DS18B20传感器信息
    public static Map<String, String> DS18Id2IdMap = new HashMap<>();
    // 武重机床部署的环境温度传感器信息
    public static Map<String, String> EnvironmentIdMap = new HashMap<>();
    // 接收到数据包的时间
    public static long receiveDataTime;

    // FBG标定波长(0度)（2017-07-01 ~ 今）
    // 应变
    public static double[] standWave01 = {1536, 1538, 1540, 1542, 1544, 1546, 1547, 1550, 1552, 1554, 1555, 1558, 1560, 1561, 1564};
    public static double[] standWave02 = {1550, 1552, 1554, 1556, 1559, 1560, 1562, 1563};
    public static double[] standWave03 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
    public static double[] standWave04 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
    public static double[] standWave05 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1551, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
    public static double[] standWave06 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1563};
    public static double[] standWave07 = {1536, 1538, 1540, 1542, 1544, 1546, 1548};
    // 温度
    public static double[] standWave08 = {1535.812, 1537.794, 1539.784, 1541.831, 1543.769, 1545.771, 1547.778, 1549.832, 1551.942, 1553.969, 1555.900, 1557.744, 1559.768, 1561.900, 1563.821};
    public static double[] standWave09 = {1549.800, 1551.835, 1553.913, 1555.955, 1557.982, 1559.878, 1561.884, 1563.831};
    public static double[] standWave10 = {1551.819, 1553.809, 1555.166, 1557.806, 1559.772, 1561.839, 1563.772};
    public static double[] standWave11 = {1535.818, 1537.850, 1539.836, 1541.884, 1543.833, 1545.827, 1547.818, 1549.816, 1551.777, 1553.801, 1555.885, 1557.881, 1559.842, 1561.780, 1563.736};
    public static double[] standWave12 = {1535.781, 1537.786, 1539.775, 1541.843, 1543.813, 1545.788, 1547.763, 1549.777, 1551.792, 1553.774, 1555.843, 1557.841, 1559.891, 1561.979, 1563.997};
    public static double[] standWave13 = {1535.787, 1537.795, 1539.778, 1541.810, 1543.792, 1545.748, 1547.752, 1549.752, 1551.824, 1553.802, 1555.194, 1557.897, 1559.834, 1561.887, 1563.856};
    public static double[] standWave14 = {1535.818, 1537.837, 1539.827, 1541.867, 1543.772, 1545.768, 1547.764};
    public static double[] standWave15 = {1535.855, 1537.920, 1539.875, 1541.905, 1543.903, 1545.854, 1547.871, 1549.908};
    public static double[] standWave16 = {1541.942, 1557.867, 1559.851, 1561.889, 0000.000, 0000.000, 0000.000, 0000.000};
    public static double[] standWave17 = {1535.851, 1538.780, 1541.860, 1544.745, 0000.000, 0000.000, 0000.000, 0000.000};
    public static double[] standWave18 = {1553.789, 1556.869, 1559.908, 1562.840, 0000.000, 0000.000, 0000.000, 0000.000};
    public static double[] standWave19 = {1536.790, 1539.759, 1542.691, 1545.759, 1548.719, 1551.835, 1554.707, 1557.714, 1560.756, 1563.697};
    public static double[] standWave20 = {1537.828, 1540.804, 1543.726, 1546.769, 1549.698, 1552.749, 1555.862, 1558.796, 1561.737, 1565.760};
    public static double[] standWave21 = {1533.177, 1536.680, 1539.622, 1542.445, 1545.646, 1548.485, 1551.763};
    public static double[] standWave22 = {1533.139, 1536.207, 1539.487, 1542.141, 1545.127, 1548.153, 1551.433, 1554.220, 1557.324, 1560.406};
    public static double[] standWave23 = {1532.322, 1535.331, 1538.348, 1541.278};
    public static double[] standWave24 = {1532.238, 1535.493, 1538.507, 1541.482, 1544.521, 1547.337, 1550.380, 1553.582, 1556.300, 1559.400};
    public static double[] standWave25 = {1533.363, 1536.476, 1538.212, 1541.983, 1544.813, 1548.062, 1550.770, 1554.162, 1556.829, 1559.949};
    public static double[] standWave26 = {1547.437, 1553.448, 1556.468, 1559.291};
    public static double[] standWave27 = {1537.852, 1540.774, 1543.699, 1546.773, 1549.698, 1552.776, 1555.862, 1558.742, 1561.839};
    public static double[] standWave28 = {1536.781, 1539.743, 1542.735, 1545.769, 1548.737, 1551.880, 1554.742, 1557.776, 1560.722, 1563.742};
    public static double[] standWave29 = {1537.861, 1540.801, 1543.742, 1546.799, 1549.847, 1552.743, 1555.881, 1558.777, 1561.789, 1565.814};
    public static double[] standWave30 = {1536.815, 1539.839, 1542.709, 1545.738, 1548.851, 1551.866, 1554.714, 1557.736, 1560.760, 1563.732};
    public static double[] standWave31 = {1537.796, 1540.815, 1543.709, 1546.750, 1549.719, 1552.755, 1555.831, 1558.739, 1561.774, 1565.756};
    public static double[] standWave32 = {1554.860, 1558.063, 1560.975};

//	// FBG标定波长(0度)（xxx ~ 2017-07-01）
//	// 应变
//	public static double[] standWave01 = {1536, 1538, 1540, 1542, 1544, 1546, 1547, 1550, 1552, 1554, 1555, 1558, 1560, 1561, 1564};
//	public static double[] standWave02 = {1550, 1552, 1554, 1556, 1559, 1560, 1562, 1563};
//	public static double[] standWave03 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
//	public static double[] standWave04 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
//	public static double[] standWave05 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1551, 1552, 1554, 1556, 1558, 1560, 1562, 1564};
//	public static double[] standWave06 = {1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1563};
//	public static double[] standWave07 = {1536, 1538, 1540, 1542, 1544, 1546, 1548};
//	// 温度
//	public static double[] standWave08 = {1535.819, 1537.796, 1539.778, 1541.821, 1543.778, 1545.761, 1547.759, 1549.810, 1552.055, 1554.093, 1556.025, 1557.901, 1559.836, 1561.880, 1563.805};
//	public static double[] standWave09 = {1549.780, 1551.853, 1554.025, 1556.016, 1558.034, 1559.984, 1561.991, 1563.916};
//	public static double[] standWave10 = {1551.872, 1553.928, 1555.959, 1557.964, 1559.851, 1561.912, 1563.806};
//	public static double[] standWave11 = {1535.935, 1537.963, 1539.949, 1542.025, 1543.970, 1545.961, 1547.951, 1549.947, 1551.907, 1553.947, 1555.942, 1557.954, 1559.962, 1561.914, 1563.879};
//	public static double[] standWave12 = {1535.822, 1537.828, 1539.793, 1541.824, 1543.792, 1545.759, 1547.731, 1549.750, 1551.784, 1553.801, 1555.873, 1557.885, 1559.895, 1561.987, 1564.013};
//	public static double[] standWave13 = {1535.895, 1537.902, 1539.888, 1541.916, 1543.894, 1545.858, 1547.858, 1549.847, 1551.886, 1553.876, 1555.938, 1557.953, 1559.932, 1561.936, 1563.938};
//	public static double[] standWave14 = {1535.785, 1537.811, 1539.801, 1541.842, 1543.757, 1545.749, 1547.739};
//	public static double[] standWave15 = {1535.956, 1538.023, 1539.980, 1542.010, 1544.005, 1545.957, 1547.960, 1549.990};
//	public static double[] standWave16 = {1557.858, 1559.846, 1561.851, 1563.835, 0000.000, 0000.000, 0000.000, 0000.000};
//	public static double[] standWave17 = {1550.802, 1552.831, 1554.897, 1556.897, 0000.000, 0000.000, 0000.000, 0000.000};
//	public static double[] standWave18 = {1543.804, 1545.869, 1547.865, 1549.805, 0000.000, 0000.000, 0000.000, 0000.000};
//	public static double[] standWave19 = {1536.763, 1540.138, 1542.679, 1545.732, 1548.709, 1551.804, 1554.665, 1557.678, 1560.726, 1564.200};
//	public static double[] standWave20 = {1537.779, 1540.742, 1543.671, 1546.714, 1549.659, 1552.720, 1555.818, 1558.769, 1561.702, 1565.741};
//	public static double[] standWave21 = {1533.606, 1537.188, 1540.176, 1542.945, 1546.062, 1548.887, 1552.257};
//	public static double[] standWave22 = {1533.566, 1536.622, 1539.961, 1542.601, 1545.597, 1548.598, 1551.959, 1554.702, 1557.721, 1560.892};
//	public static double[] standWave23 = {1532.729, 1535.717, 1538.752, 1541.684};
//	public static double[] standWave24 = {1532.691, 1535.924, 1538.925, 1541.869, 1544.993, 1547.716, 1550.796, 1554.009, 1556.718, 1559.705};
//	public static double[] standWave25 = {1533.759, 1536.861, 1538.652, 1542.413, 1545.249, 1548.483, 1551.271, 1554.603, 1557.231, 1560.437};
//	public static double[] standWave26 = {1547.860, 1553.843, 1556.916, 1559.731};
//	public static double[] standWave27 = {1537.790, 1540.714, 1543.653, 1546.732, 1549.672, 1552.714, 1555.757, 1558.626, 1561.673};
//	public static double[] standWave28 = {1536.743, 1539.722, 1542.702, 1545.728, 1548.729, 1551.866, 1554.707, 1557.738, 1560.677, 1563.693};
//	public static double[] standWave29 = {1537.849, 1540.757, 1543.703, 1546.733, 1549.813, 1552.697, 1555.838, 1558.740, 1561.685, 1565.750};
//	public static double[] standWave30 = {1536.812, 1539.811, 1542.697, 1545.702, 1548.804, 1551.820, 1554.617, 1557.661, 1560.702, 1563.682};
//	public static double[] standWave31 = {1537.756, 1540.757, 1543.670, 1546.710, 1549.669, 1552.698, 1555.776, 1558.696, 1561.717, 1565.628};
//	public static double[] standWave32 = {1555.018, 1558.270, 1561.124};

    // 武重ZK5540机床传感器初始化标定、ID记录数据
    public static void initWaveMap() {
        if (!isInit) {
            // 是否发送邮件
            alreadySendMail = false;
            // 保存文件路径初始化
            if (isWindows()) {
                fileSavePath = "D:\\logs\\";
            }
            // FBG温度新版归零Map 2017年6月1日之后的版本
            IdWaveMap.put("001-SFT00-00", standWave08[0]);
            IdWaveMap.put("001-SFT00-01", standWave08[1]);
            IdWaveMap.put("001-SFT00-02", standWave08[2]);
            IdWaveMap.put("001-SFT00-03", standWave08[3]);
            IdWaveMap.put("001-SFT00-04", standWave08[4]);
            IdWaveMap.put("001-SFT00-05", standWave08[5]);
            IdWaveMap.put("001-SFT00-06", standWave08[6]);
            IdWaveMap.put("001-SFT00-07", standWave08[7]);
            IdWaveMap.put("001-SFT00-08", standWave08[8]);
            IdWaveMap.put("001-SFT00-09", standWave08[9]);
            IdWaveMap.put("001-SFT00-10", standWave08[10]);
            IdWaveMap.put("001-SFT00-11", standWave08[11]);
            IdWaveMap.put("001-SFT00-12", standWave08[12]);
            IdWaveMap.put("001-SFT00-13", standWave08[13]);
            IdWaveMap.put("001-SFT00-14", standWave08[14]);
            IdWaveMap.put("001-SFT01-00", standWave09[0]);
            IdWaveMap.put("001-SFT01-01", standWave09[1]);
            IdWaveMap.put("001-SFT01-02", standWave09[2]);
            IdWaveMap.put("001-SFT01-03", standWave09[3]);
            IdWaveMap.put("001-SFT01-04", standWave09[4]);
            IdWaveMap.put("001-SFT01-05", standWave09[5]);
            IdWaveMap.put("001-SFT01-06", standWave09[6]);
            IdWaveMap.put("001-SFT01-07", standWave09[7]);
            IdWaveMap.put("001-SFT02-00", standWave10[0]);
            IdWaveMap.put("001-SFT02-01", standWave10[1]);
            IdWaveMap.put("001-SFT02-02", standWave10[2]);
            IdWaveMap.put("001-SFT02-03", standWave10[3]);
            IdWaveMap.put("001-SFT02-04", standWave10[4]);
            IdWaveMap.put("001-SFT02-05", standWave10[5]);
            IdWaveMap.put("001-SFT02-06", standWave10[6]);
            IdWaveMap.put("001-SFT03-00", standWave11[0]);
            IdWaveMap.put("001-SFT03-01", standWave11[1]);
            IdWaveMap.put("001-SFT03-02", standWave11[2]);
            IdWaveMap.put("001-SFT03-03", standWave11[3]);
            IdWaveMap.put("001-SFT03-04", standWave11[4]);
            IdWaveMap.put("001-SFT03-05", standWave11[5]);
            IdWaveMap.put("001-SFT03-06", standWave11[6]);
            IdWaveMap.put("001-SFT03-07", standWave11[7]);
            IdWaveMap.put("001-SFT03-08", standWave11[8]);
            IdWaveMap.put("001-SFT03-09", standWave11[9]);
            IdWaveMap.put("001-SFT03-10", standWave11[10]);
            IdWaveMap.put("001-SFT03-11", standWave11[11]);
            IdWaveMap.put("001-SFT03-12", standWave11[12]);
            IdWaveMap.put("001-SFT03-13", standWave11[13]);
            IdWaveMap.put("001-SFT03-14", standWave11[14]);
            IdWaveMap.put("001-SFT04-00", standWave12[0]);
            IdWaveMap.put("001-SFT04-01", standWave12[1]);
            IdWaveMap.put("001-SFT04-02", standWave12[2]);
            IdWaveMap.put("001-SFT04-03", standWave12[3]);
            IdWaveMap.put("001-SFT04-04", standWave12[4]);
            IdWaveMap.put("001-SFT04-05", standWave12[5]);
            IdWaveMap.put("001-SFT04-06", standWave12[6]);
            IdWaveMap.put("001-SFT04-07", standWave12[7]);
            IdWaveMap.put("001-SFT04-08", standWave12[8]);
            IdWaveMap.put("001-SFT04-09", standWave12[9]);
            IdWaveMap.put("001-SFT04-10", standWave12[10]);
            IdWaveMap.put("001-SFT04-11", standWave12[11]);
            IdWaveMap.put("001-SFT04-12", standWave12[12]);
            IdWaveMap.put("001-SFT04-13", standWave12[13]);
            IdWaveMap.put("001-SFT04-14", standWave12[14]);
            IdWaveMap.put("001-SFT05-00", standWave13[0]);
            IdWaveMap.put("001-SFT05-01", standWave13[1]);
            IdWaveMap.put("001-SFT05-02", standWave13[2]);
            IdWaveMap.put("001-SFT05-03", standWave13[3]);
            IdWaveMap.put("001-SFT05-04", standWave13[4]);
            IdWaveMap.put("001-SFT05-05", standWave13[5]);
            IdWaveMap.put("001-SFT05-06", standWave13[6]);
            IdWaveMap.put("001-SFT05-07", standWave13[7]);
            IdWaveMap.put("001-SFT05-08", standWave13[8]);
            IdWaveMap.put("001-SFT05-09", standWave13[9]);
            IdWaveMap.put("001-SFT05-10", standWave13[10]);
            IdWaveMap.put("001-SFT05-11", standWave13[11]);
            IdWaveMap.put("001-SFT05-12", standWave13[12]);
            IdWaveMap.put("001-SFT05-13", standWave13[13]);
            IdWaveMap.put("001-SFT05-14", standWave13[14]);
            IdWaveMap.put("001-SFT06-00", standWave14[0]);
            IdWaveMap.put("001-SFT06-01", standWave14[1]);
            IdWaveMap.put("001-SFT06-02", standWave14[2]);
            IdWaveMap.put("001-SFT06-03", standWave14[3]);
            IdWaveMap.put("001-SFT06-04", standWave14[4]);
            IdWaveMap.put("001-SFT06-05", standWave14[5]);
            IdWaveMap.put("001-SFT06-06", standWave14[6]);
            IdWaveMap.put("001-SFT07-00", standWave15[0]);
            IdWaveMap.put("001-SFT07-01", standWave15[1]);
            IdWaveMap.put("001-SFT07-02", standWave15[2]);
            IdWaveMap.put("001-SFT07-03", standWave15[3]);
            IdWaveMap.put("001-SFT07-04", standWave15[4]);
            IdWaveMap.put("001-SFT07-05", standWave15[5]);
            IdWaveMap.put("001-SFT07-06", standWave15[6]);
            IdWaveMap.put("001-SFT07-07", standWave15[7]);
            IdWaveMap.put("001-SFT08-00", standWave16[0]);
            IdWaveMap.put("001-SFT08-01", standWave16[1]);
            IdWaveMap.put("001-SFT08-02", standWave16[2]);
            IdWaveMap.put("001-SFT08-03", standWave16[3]);
            IdWaveMap.put("001-SFT08-04", standWave16[4]);
            IdWaveMap.put("001-SFT08-05", standWave16[5]);
            IdWaveMap.put("001-SFT08-06", standWave16[6]);
            IdWaveMap.put("001-SFT08-07", standWave16[7]);
            IdWaveMap.put("001-SFT09-00", standWave17[0]);
            IdWaveMap.put("001-SFT09-01", standWave17[1]);
            IdWaveMap.put("001-SFT09-02", standWave17[2]);
            IdWaveMap.put("001-SFT09-03", standWave17[3]);
            IdWaveMap.put("001-SFT09-04", standWave17[4]);
            IdWaveMap.put("001-SFT09-05", standWave17[5]);
            IdWaveMap.put("001-SFT09-06", standWave17[6]);
            IdWaveMap.put("001-SFT09-07", standWave17[7]);
            IdWaveMap.put("001-SFT10-00", standWave18[0]);
            IdWaveMap.put("001-SFT10-01", standWave18[1]);
            IdWaveMap.put("001-SFT10-02", standWave18[2]);
            IdWaveMap.put("001-SFT10-03", standWave18[3]);
            IdWaveMap.put("001-SFT10-04", standWave18[4]);
            IdWaveMap.put("001-SFT10-05", standWave18[5]);
            IdWaveMap.put("001-SFT10-06", standWave18[6]);
            IdWaveMap.put("001-SFT10-07", standWave18[7]);
            IdWaveMap.put("001-SFT11-00", standWave19[0]);
            IdWaveMap.put("001-SFT11-01", standWave19[1]);
            IdWaveMap.put("001-SFT11-02", standWave19[2]);
            IdWaveMap.put("001-SFT11-03", standWave19[3]);
            IdWaveMap.put("001-SFT11-04", standWave19[4]);
            IdWaveMap.put("001-SFT11-05", standWave19[5]);
            IdWaveMap.put("001-SFT11-06", standWave19[6]);
            IdWaveMap.put("001-SFT11-07", standWave19[7]);
            IdWaveMap.put("001-SFT11-08", standWave19[8]);
            IdWaveMap.put("001-SFT11-09", standWave19[9]);
            IdWaveMap.put("001-SFT12-00", standWave20[0]);
            IdWaveMap.put("001-SFT12-01", standWave20[1]);
            IdWaveMap.put("001-SFT12-02", standWave20[2]);
            IdWaveMap.put("001-SFT12-03", standWave20[3]);
            IdWaveMap.put("001-SFT12-04", standWave20[4]);
            IdWaveMap.put("001-SFT12-05", standWave20[5]);
            IdWaveMap.put("001-SFT12-06", standWave20[6]);
            IdWaveMap.put("001-SFT12-07", standWave20[7]);
            IdWaveMap.put("001-SFT12-08", standWave20[8]);
            IdWaveMap.put("001-SFT12-09", standWave20[9]);
            IdWaveMap.put("001-SFT13-00", standWave21[0]);
            IdWaveMap.put("001-SFT13-01", standWave21[1]);
            IdWaveMap.put("001-SFT13-02", standWave21[2]);
            IdWaveMap.put("001-SFT13-03", standWave21[3]);
            IdWaveMap.put("001-SFT13-04", standWave21[4]);
            IdWaveMap.put("001-SFT13-05", standWave21[5]);
            IdWaveMap.put("001-SFT13-06", standWave21[6]);
            IdWaveMap.put("001-SFT14-00", standWave22[0]);
            IdWaveMap.put("001-SFT14-01", standWave22[1]);
            IdWaveMap.put("001-SFT14-02", standWave22[2]);
            IdWaveMap.put("001-SFT14-03", standWave22[3]);
            IdWaveMap.put("001-SFT14-04", standWave22[4]);
            IdWaveMap.put("001-SFT14-05", standWave22[5]);
            IdWaveMap.put("001-SFT14-06", standWave22[6]);
            IdWaveMap.put("001-SFT14-07", standWave22[7]);
            IdWaveMap.put("001-SFT14-08", standWave22[8]);
            IdWaveMap.put("001-SFT14-09", standWave22[9]);
            IdWaveMap.put("001-SFT15-00", standWave23[0]);
            IdWaveMap.put("001-SFT15-01", standWave23[1]);
            IdWaveMap.put("001-SFT15-02", standWave23[2]);
            IdWaveMap.put("001-SFT15-03", standWave23[3]);
            IdWaveMap.put("001-SFT16-00", standWave24[0]);
            IdWaveMap.put("001-SFT16-01", standWave24[1]);
            IdWaveMap.put("001-SFT16-02", standWave24[2]);
            IdWaveMap.put("001-SFT16-03", standWave24[3]);
            IdWaveMap.put("001-SFT16-04", standWave24[4]);
            IdWaveMap.put("001-SFT16-05", standWave24[5]);
            IdWaveMap.put("001-SFT16-06", standWave24[6]);
            IdWaveMap.put("001-SFT16-07", standWave24[7]);
            IdWaveMap.put("001-SFT16-08", standWave24[8]);
            IdWaveMap.put("001-SFT16-09", standWave24[9]);
            IdWaveMap.put("001-SFT17-00", standWave25[0]);
            IdWaveMap.put("001-SFT17-01", standWave25[1]);
            IdWaveMap.put("001-SFT17-02", standWave25[2]);
            IdWaveMap.put("001-SFT17-03", standWave25[3]);
            IdWaveMap.put("001-SFT17-04", standWave25[4]);
            IdWaveMap.put("001-SFT17-05", standWave25[5]);
            IdWaveMap.put("001-SFT17-06", standWave25[6]);
            IdWaveMap.put("001-SFT17-07", standWave25[7]);
            IdWaveMap.put("001-SFT17-08", standWave25[8]);
            IdWaveMap.put("001-SFT17-09", standWave25[9]);
            IdWaveMap.put("001-SFT18-00", standWave26[0]);
            IdWaveMap.put("001-SFT18-01", standWave26[1]);
            IdWaveMap.put("001-SFT18-02", standWave26[2]);
            IdWaveMap.put("001-SFT18-03", standWave26[3]);
            IdWaveMap.put("001-SFT19-00", standWave27[0]);
            IdWaveMap.put("001-SFT19-01", standWave27[1]);
            IdWaveMap.put("001-SFT19-02", standWave27[2]);
            IdWaveMap.put("001-SFT19-03", standWave27[3]);
            IdWaveMap.put("001-SFT19-04", standWave27[4]);
            IdWaveMap.put("001-SFT19-05", standWave27[5]);
            IdWaveMap.put("001-SFT19-06", standWave27[6]);
            IdWaveMap.put("001-SFT19-07", standWave27[7]);
            IdWaveMap.put("001-SFT19-08", standWave27[8]);
            IdWaveMap.put("001-SFT20-00", standWave28[0]);
            IdWaveMap.put("001-SFT20-01", standWave28[1]);
            IdWaveMap.put("001-SFT20-02", standWave28[2]);
            IdWaveMap.put("001-SFT20-03", standWave28[3]);
            IdWaveMap.put("001-SFT20-04", standWave28[4]);
            IdWaveMap.put("001-SFT20-05", standWave28[5]);
            IdWaveMap.put("001-SFT20-06", standWave28[6]);
            IdWaveMap.put("001-SFT20-07", standWave28[7]);
            IdWaveMap.put("001-SFT20-08", standWave28[8]);
            IdWaveMap.put("001-SFT20-09", standWave28[9]);
            IdWaveMap.put("001-SFT21-00", standWave29[0]);
            IdWaveMap.put("001-SFT21-01", standWave29[1]);
            IdWaveMap.put("001-SFT21-02", standWave29[2]);
            IdWaveMap.put("001-SFT21-03", standWave29[3]);
            IdWaveMap.put("001-SFT21-04", standWave29[4]);
            IdWaveMap.put("001-SFT21-05", standWave29[5]);
            IdWaveMap.put("001-SFT21-06", standWave29[6]);
            IdWaveMap.put("001-SFT21-07", standWave29[7]);
            IdWaveMap.put("001-SFT21-08", standWave29[8]);
            IdWaveMap.put("001-SFT21-09", standWave29[9]);
            IdWaveMap.put("001-SFT22-00", standWave30[0]);
            IdWaveMap.put("001-SFT22-01", standWave30[1]);
            IdWaveMap.put("001-SFT22-02", standWave30[2]);
            IdWaveMap.put("001-SFT22-03", standWave30[3]);
            IdWaveMap.put("001-SFT22-04", standWave30[4]);
            IdWaveMap.put("001-SFT22-05", standWave30[5]);
            IdWaveMap.put("001-SFT22-06", standWave30[6]);
            IdWaveMap.put("001-SFT22-07", standWave30[7]);
            IdWaveMap.put("001-SFT22-08", standWave30[8]);
            IdWaveMap.put("001-SFT22-09", standWave30[9]);
            IdWaveMap.put("001-SFT23-00", standWave31[0]);
            IdWaveMap.put("001-SFT23-01", standWave31[1]);
            IdWaveMap.put("001-SFT23-02", standWave31[2]);
            IdWaveMap.put("001-SFT23-03", standWave31[3]);
            IdWaveMap.put("001-SFT23-04", standWave31[4]);
            IdWaveMap.put("001-SFT23-05", standWave31[5]);
            IdWaveMap.put("001-SFT23-06", standWave31[6]);
            IdWaveMap.put("001-SFT23-07", standWave31[7]);
            IdWaveMap.put("001-SFT23-08", standWave31[8]);
            IdWaveMap.put("001-SFT23-09", standWave31[9]);
            IdWaveMap.put("001-SFT24-00", standWave32[0]);
            IdWaveMap.put("001-SFT24-01", standWave32[1]);
            IdWaveMap.put("001-SFT24-02", standWave32[2]);

            // 电类Map
            DS18Id2IdMap.put("28ffcdfa001604cb", "001-SDT00-00");
            DS18Id2IdMap.put("28ff7eeda0160301", "001-SDT00-01");
            DS18Id2IdMap.put("28ffa203011604fc", "001-SDT00-02");
            DS18Id2IdMap.put("28ffd7cc0016044b", "001-SDT00-03");
            DS18Id2IdMap.put("28ff6ba7a0160589", "001-SDT00-04");
            DS18Id2IdMap.put("28ff28f8041603d9", "001-SDT00-05");
            DS18Id2IdMap.put("28ff280c01160410", "001-SDT00-06");
            DS18Id2IdMap.put("28ff4a2305160375", "001-SDT00-07");
            DS18Id2IdMap.put("28ffaf1fb2150108", "001-SDT01-00");
            DS18Id2IdMap.put("28ff921db2150167", "001-SDT01-01");
            DS18Id2IdMap.put("28ff86eb041603f8", "001-SDT01-02");
            DS18Id2IdMap.put("28ffd3dd041603fe", "001-SDT01-03");
            DS18Id2IdMap.put("28ff71c100160479", "001-SDT01-04");
            DS18Id2IdMap.put("28ffb81cb2150311", "001-SDT01-05");
            DS18Id2IdMap.put("28ff6a0c0116047a", "001-SDT01-06");
            DS18Id2IdMap.put("28ffa2dd00160443", "001-SDT01-07");
            DS18Id2IdMap.put("28ff1d93a01603e3", "001-SDT02-00");
            DS18Id2IdMap.put("28ff78bea01603cd", "001-SDT02-01");
            DS18Id2IdMap.put("28ff4ec300160495", "001-SDT02-02");
            DS18Id2IdMap.put("28ffaddc001604a3", "001-SDT02-03");
            DS18Id2IdMap.put("28ffb6e500160474", "001-SDT02-04");
            DS18Id2IdMap.put("28ffa3f7001604e5", "001-SDT02-05");
            DS18Id2IdMap.put("28ff30f70016041c", "001-SDT02-06");
            DS18Id2IdMap.put("28ff95f7001604fd", "001-SDT02-07");
            DS18Id2IdMap.put("28ffe6ce00160405", "001-SDT03-00");
            DS18Id2IdMap.put("28ff783db215044f", "001-SDT03-01");
            DS18Id2IdMap.put("28ff52c600160449", "001-SDT03-02");
            DS18Id2IdMap.put("28ffed30b2150334", "001-SDT03-03");
            DS18Id2IdMap.put("28ffdcc20016042e", "001-SDT03-04");
            DS18Id2IdMap.put("28ffd827b215045f", "001-SDT03-05");
            DS18Id2IdMap.put("28ff3425051603b3", "001-SDT03-06");
            DS18Id2IdMap.put("28ff247eb2150310", "001-SDT03-07");
            DS18Id2IdMap.put("28ff76e500160456", "001-SDT04-00");
            DS18Id2IdMap.put("28ffa5c30016043f", "001-SDT04-01");
            DS18Id2IdMap.put("28ff2d22b2150195", "001-SDT04-02");
            DS18Id2IdMap.put("28ffcd0d01160497", "001-SDT04-03");
            DS18Id2IdMap.put("28ff55a7a01605af", "001-SDT04-04");
            DS18Id2IdMap.put("28ff56d7001604e1", "001-SDT04-05");
            DS18Id2IdMap.put("28ff3ccba0160491", "001-SDT04-06");
            DS18Id2IdMap.put("28ff0091a01604f7", "001-SDT04-07");
            DS18Id2IdMap.put("28ff80efa01605df", "001-SDT05-00");
            DS18Id2IdMap.put("28ffd7c6a0160325", "001-SDT05-01");
            DS18Id2IdMap.put("28ff04ada01605ec", "001-SDT05-02");
            DS18Id2IdMap.put("28fffdd4a0160582", "001-SDT05-03");
            DS18Id2IdMap.put("28ff87caa0160421", "001-SDT05-04");
            DS18Id2IdMap.put("28ff1d9da0160475", "001-SDT05-05");
            DS18Id2IdMap.put("28fffdada01605b9", "001-SDT05-06");
            DS18Id2IdMap.put("28ff44d3a01605b8", "001-SDT05-07");
            DS18Id2IdMap.put("28ff538da0160406", "001-SDT06-00");
            DS18Id2IdMap.put("28ff387da0160416", "001-SDT06-01");
            DS18Id2IdMap.put("28ffcacfa01605fb", "001-SDT06-02");
            DS18Id2IdMap.put("28ff16a8a0160592", "001-SDT06-03");
            DS18Id2IdMap.put("285c7ac7060000f3", "001-SDT07-00");
            DS18Id2IdMap.put("28ffafd9531704fa", "001-SDT07-01");
            DS18Id2IdMap.put("28ffd7da53170421", "001-SDT07-02");
            DS18Id2IdMap.put("28fffaee53170473", "001-SDT07-03");
            DS18Id2IdMap.put("28ff0524541704e2", "001-SDT07-04");
            DS18Id2IdMap.put("28fff1f05317042e", "001-SDT07-05");
            DS18Id2IdMap.put("28ff2e4d54170469", "001-SDT07-06");
            DS18Id2IdMap.put("28ff5ada53170406", "001-SDT07-07");

            // 环境温度
            EnvironmentIdMap.put("28f3deee050000a0", "001-SET00-00");
            EnvironmentIdMap.put("28ff401e0516031d", "001-SET00-01");
            EnvironmentIdMap.put("28ff2cf700160441", "001-SET01-00");
            EnvironmentIdMap.put("28ff7cff001604c8", "001-SET01-01");

            // FBG映射到SST、SFT
            FGBtoSSTSFTMap.put("001-SFT00-00", "001-SST00-00");
            FGBtoSSTSFTMap.put("001-SFT00-01", "001-SST00-01");
            FGBtoSSTSFTMap.put("001-SFT00-02", "001-SST00-02");
            FGBtoSSTSFTMap.put("001-SFT00-03", "001-SST00-03");
            FGBtoSSTSFTMap.put("001-SFT00-04", "001-SST00-04");
            FGBtoSSTSFTMap.put("001-SFT00-05", "001-SST00-05");
            FGBtoSSTSFTMap.put("001-SFT00-06", "001-SST00-06");
            FGBtoSSTSFTMap.put("001-SFT00-07", "001-SST00-07");
            FGBtoSSTSFTMap.put("001-SFT00-08", "001-SST00-08");
            FGBtoSSTSFTMap.put("001-SFT00-09", "001-SST00-09");
            FGBtoSSTSFTMap.put("001-SFT00-10", "001-SST00-10");
            FGBtoSSTSFTMap.put("001-SFT00-11", "001-SST00-11");
            FGBtoSSTSFTMap.put("001-SFT00-12", "001-SST00-12");
            FGBtoSSTSFTMap.put("001-SFT00-13", "001-SST00-13");
            FGBtoSSTSFTMap.put("001-SFT00-14", "001-SST00-14");
            FGBtoSSTSFTMap.put("001-SFT00-15", "001-SST00-15");
            FGBtoSSTSFTMap.put("001-SFT00-16", "001-SST00-16");
            FGBtoSSTSFTMap.put("001-SFT00-17", "001-SST00-17");
            FGBtoSSTSFTMap.put("001-SFT00-18", "001-SST00-18");
            FGBtoSSTSFTMap.put("001-SFT00-19", "001-SST00-19");
            FGBtoSSTSFTMap.put("001-SFT01-00", "001-SST01-00");
            FGBtoSSTSFTMap.put("001-SFT01-01", "001-SST01-01");
            FGBtoSSTSFTMap.put("001-SFT01-02", "001-SST01-02");
            FGBtoSSTSFTMap.put("001-SFT01-03", "001-SST01-03");
            FGBtoSSTSFTMap.put("001-SFT01-04", "001-SST01-04");
            FGBtoSSTSFTMap.put("001-SFT01-05", "001-SST01-05");
            FGBtoSSTSFTMap.put("001-SFT01-06", "001-SST01-06");
            FGBtoSSTSFTMap.put("001-SFT01-07", "001-SST01-07");
            FGBtoSSTSFTMap.put("001-SFT01-08", "001-SST01-08");
            FGBtoSSTSFTMap.put("001-SFT01-09", "001-SST01-09");
            FGBtoSSTSFTMap.put("001-SFT01-10", "001-SST01-10");
            FGBtoSSTSFTMap.put("001-SFT01-11", "001-SST01-11");
            FGBtoSSTSFTMap.put("001-SFT01-12", "001-SST01-12");
            FGBtoSSTSFTMap.put("001-SFT01-13", "001-SST01-13");
            FGBtoSSTSFTMap.put("001-SFT01-14", "001-SST01-14");
            FGBtoSSTSFTMap.put("001-SFT01-15", "001-SST01-15");
            FGBtoSSTSFTMap.put("001-SFT01-16", "001-SST01-16");
            FGBtoSSTSFTMap.put("001-SFT01-17", "001-SST01-17");
            FGBtoSSTSFTMap.put("001-SFT01-18", "001-SST01-18");
            FGBtoSSTSFTMap.put("001-SFT01-19", "001-SST01-19");
            FGBtoSSTSFTMap.put("001-SFT02-00", "001-SST02-00");
            FGBtoSSTSFTMap.put("001-SFT02-01", "001-SST02-01");
            FGBtoSSTSFTMap.put("001-SFT02-02", "001-SST02-02");
            FGBtoSSTSFTMap.put("001-SFT02-03", "001-SST02-03");
            FGBtoSSTSFTMap.put("001-SFT02-04", "001-SST02-04");
            FGBtoSSTSFTMap.put("001-SFT02-05", "001-SST02-05");
            FGBtoSSTSFTMap.put("001-SFT02-06", "001-SST02-06");
            FGBtoSSTSFTMap.put("001-SFT02-07", "001-SST02-07");
            FGBtoSSTSFTMap.put("001-SFT02-08", "001-SST02-08");
            FGBtoSSTSFTMap.put("001-SFT02-09", "001-SST02-09");
            FGBtoSSTSFTMap.put("001-SFT02-10", "001-SST02-10");
            FGBtoSSTSFTMap.put("001-SFT02-11", "001-SST02-11");
            FGBtoSSTSFTMap.put("001-SFT02-12", "001-SST02-12");
            FGBtoSSTSFTMap.put("001-SFT02-13", "001-SST02-13");
            FGBtoSSTSFTMap.put("001-SFT02-14", "001-SST02-14");
            FGBtoSSTSFTMap.put("001-SFT02-15", "001-SST02-15");
            FGBtoSSTSFTMap.put("001-SFT02-16", "001-SST02-16");
            FGBtoSSTSFTMap.put("001-SFT02-17", "001-SST02-17");
            FGBtoSSTSFTMap.put("001-SFT02-18", "001-SST02-18");
            FGBtoSSTSFTMap.put("001-SFT02-19", "001-SST02-19");
            FGBtoSSTSFTMap.put("001-SFT03-00", "001-SST03-00");
            FGBtoSSTSFTMap.put("001-SFT03-01", "001-SST03-01");
            FGBtoSSTSFTMap.put("001-SFT03-02", "001-SST03-02");
            FGBtoSSTSFTMap.put("001-SFT03-03", "001-SST03-03");
            FGBtoSSTSFTMap.put("001-SFT03-04", "001-SST03-04");
            FGBtoSSTSFTMap.put("001-SFT03-05", "001-SST03-05");
            FGBtoSSTSFTMap.put("001-SFT03-06", "001-SST03-06");
            FGBtoSSTSFTMap.put("001-SFT03-07", "001-SST03-07");
            FGBtoSSTSFTMap.put("001-SFT03-08", "001-SST03-08");
            FGBtoSSTSFTMap.put("001-SFT03-09", "001-SST03-09");
            FGBtoSSTSFTMap.put("001-SFT03-10", "001-SST03-10");
            FGBtoSSTSFTMap.put("001-SFT03-11", "001-SST03-11");
            FGBtoSSTSFTMap.put("001-SFT03-12", "001-SST03-12");
            FGBtoSSTSFTMap.put("001-SFT03-13", "001-SST03-13");
            FGBtoSSTSFTMap.put("001-SFT03-14", "001-SST03-14");
            FGBtoSSTSFTMap.put("001-SFT03-15", "001-SST03-15");
            FGBtoSSTSFTMap.put("001-SFT03-16", "001-SST03-16");
            FGBtoSSTSFTMap.put("001-SFT03-17", "001-SST03-17");
            FGBtoSSTSFTMap.put("001-SFT03-18", "001-SST03-18");
            FGBtoSSTSFTMap.put("001-SFT03-19", "001-SST03-19");
            FGBtoSSTSFTMap.put("001-SFT04-00", "001-SST04-00");
            FGBtoSSTSFTMap.put("001-SFT04-01", "001-SST04-01");
            FGBtoSSTSFTMap.put("001-SFT04-02", "001-SST04-02");
            FGBtoSSTSFTMap.put("001-SFT04-03", "001-SST04-03");
            FGBtoSSTSFTMap.put("001-SFT04-04", "001-SST04-04");
            FGBtoSSTSFTMap.put("001-SFT04-05", "001-SST04-05");
            FGBtoSSTSFTMap.put("001-SFT04-06", "001-SST04-06");
            FGBtoSSTSFTMap.put("001-SFT04-07", "001-SST04-07");
            FGBtoSSTSFTMap.put("001-SFT04-08", "001-SST04-08");
            FGBtoSSTSFTMap.put("001-SFT04-09", "001-SST04-09");
            FGBtoSSTSFTMap.put("001-SFT04-10", "001-SST04-10");
            FGBtoSSTSFTMap.put("001-SFT04-11", "001-SST04-11");
            FGBtoSSTSFTMap.put("001-SFT04-12", "001-SST04-12");
            FGBtoSSTSFTMap.put("001-SFT04-13", "001-SST04-13");
            FGBtoSSTSFTMap.put("001-SFT04-14", "001-SST04-14");
            FGBtoSSTSFTMap.put("001-SFT04-15", "001-SST04-15");
            FGBtoSSTSFTMap.put("001-SFT04-16", "001-SST04-16");
            FGBtoSSTSFTMap.put("001-SFT04-17", "001-SST04-17");
            FGBtoSSTSFTMap.put("001-SFT04-18", "001-SST04-18");
            FGBtoSSTSFTMap.put("001-SFT04-19", "001-SST04-19");
            FGBtoSSTSFTMap.put("001-SFT05-00", "001-SST05-00");
            FGBtoSSTSFTMap.put("001-SFT05-01", "001-SST05-01");
            FGBtoSSTSFTMap.put("001-SFT05-02", "001-SST05-02");
            FGBtoSSTSFTMap.put("001-SFT05-03", "001-SST05-03");
            FGBtoSSTSFTMap.put("001-SFT05-04", "001-SST05-04");
            FGBtoSSTSFTMap.put("001-SFT05-05", "001-SST05-05");
            FGBtoSSTSFTMap.put("001-SFT05-06", "001-SST05-06");
            FGBtoSSTSFTMap.put("001-SFT05-07", "001-SST05-07");
            FGBtoSSTSFTMap.put("001-SFT05-08", "001-SST05-08");
            FGBtoSSTSFTMap.put("001-SFT05-09", "001-SST05-09");
            FGBtoSSTSFTMap.put("001-SFT05-10", "001-SST05-10");
            FGBtoSSTSFTMap.put("001-SFT05-11", "001-SST05-11");
            FGBtoSSTSFTMap.put("001-SFT05-12", "001-SST05-12");
            FGBtoSSTSFTMap.put("001-SFT05-13", "001-SST05-13");
            FGBtoSSTSFTMap.put("001-SFT05-14", "001-SST05-14");
            FGBtoSSTSFTMap.put("001-SFT05-15", "001-SST05-15");
            FGBtoSSTSFTMap.put("001-SFT05-16", "001-SST05-16");
            FGBtoSSTSFTMap.put("001-SFT05-17", "001-SST05-17");
            FGBtoSSTSFTMap.put("001-SFT05-18", "001-SST05-18");
            FGBtoSSTSFTMap.put("001-SFT05-19", "001-SST05-19");
            FGBtoSSTSFTMap.put("001-SFT06-00", "001-SST06-00");
            FGBtoSSTSFTMap.put("001-SFT06-01", "001-SST06-01");
            FGBtoSSTSFTMap.put("001-SFT06-02", "001-SST06-02");
            FGBtoSSTSFTMap.put("001-SFT06-03", "001-SST06-03");
            FGBtoSSTSFTMap.put("001-SFT06-04", "001-SST06-04");
            FGBtoSSTSFTMap.put("001-SFT06-05", "001-SST06-05");
            FGBtoSSTSFTMap.put("001-SFT06-06", "001-SST06-06");
            FGBtoSSTSFTMap.put("001-SFT06-07", "001-SST06-07");
            FGBtoSSTSFTMap.put("001-SFT06-08", "001-SST06-08");
            FGBtoSSTSFTMap.put("001-SFT06-09", "001-SST06-09");
            FGBtoSSTSFTMap.put("001-SFT06-10", "001-SST06-10");
            FGBtoSSTSFTMap.put("001-SFT06-11", "001-SST06-11");
            FGBtoSSTSFTMap.put("001-SFT06-12", "001-SST06-12");
            FGBtoSSTSFTMap.put("001-SFT06-13", "001-SST06-13");
            FGBtoSSTSFTMap.put("001-SFT06-14", "001-SST06-14");
            FGBtoSSTSFTMap.put("001-SFT06-15", "001-SST06-15");
            FGBtoSSTSFTMap.put("001-SFT06-16", "001-SST06-16");
            FGBtoSSTSFTMap.put("001-SFT06-17", "001-SST06-17");
            FGBtoSSTSFTMap.put("001-SFT06-18", "001-SST06-18");
            FGBtoSSTSFTMap.put("001-SFT06-19", "001-SST06-19");
            FGBtoSSTSFTMap.put("001-SFT07-00", "001-SFT00-00");
            FGBtoSSTSFTMap.put("001-SFT07-01", "001-SFT00-01");
            FGBtoSSTSFTMap.put("001-SFT07-02", "001-SFT00-02");
            FGBtoSSTSFTMap.put("001-SFT07-03", "001-SFT00-03");
            FGBtoSSTSFTMap.put("001-SFT07-04", "001-SFT00-04");
            FGBtoSSTSFTMap.put("001-SFT07-05", "001-SFT00-05");
            FGBtoSSTSFTMap.put("001-SFT07-06", "001-SFT00-06");
            FGBtoSSTSFTMap.put("001-SFT07-07", "001-SFT00-07");
            FGBtoSSTSFTMap.put("001-SFT07-08", "001-SFT00-08");
            FGBtoSSTSFTMap.put("001-SFT07-09", "001-SFT00-09");
            FGBtoSSTSFTMap.put("001-SFT07-10", "001-SFT00-10");
            FGBtoSSTSFTMap.put("001-SFT07-11", "001-SFT00-11");
            FGBtoSSTSFTMap.put("001-SFT07-12", "001-SFT00-12");
            FGBtoSSTSFTMap.put("001-SFT07-13", "001-SFT00-13");
            FGBtoSSTSFTMap.put("001-SFT07-14", "001-SFT00-14");
            FGBtoSSTSFTMap.put("001-SFT07-15", "001-SFT00-15");
            FGBtoSSTSFTMap.put("001-SFT07-16", "001-SFT00-16");
            FGBtoSSTSFTMap.put("001-SFT07-17", "001-SFT00-17");
            FGBtoSSTSFTMap.put("001-SFT07-18", "001-SFT00-18");
            FGBtoSSTSFTMap.put("001-SFT07-19", "001-SFT00-19");
            FGBtoSSTSFTMap.put("001-SFT08-00", "001-SFT01-00");
            FGBtoSSTSFTMap.put("001-SFT08-01", "001-SFT01-01");
            FGBtoSSTSFTMap.put("001-SFT08-02", "001-SFT01-02");
            FGBtoSSTSFTMap.put("001-SFT08-03", "001-SFT01-03");
            FGBtoSSTSFTMap.put("001-SFT08-04", "001-SFT01-04");
            FGBtoSSTSFTMap.put("001-SFT08-05", "001-SFT01-05");
            FGBtoSSTSFTMap.put("001-SFT08-06", "001-SFT01-06");
            FGBtoSSTSFTMap.put("001-SFT08-07", "001-SFT01-07");
            FGBtoSSTSFTMap.put("001-SFT08-08", "001-SFT01-08");
            FGBtoSSTSFTMap.put("001-SFT08-09", "001-SFT01-09");
            FGBtoSSTSFTMap.put("001-SFT08-10", "001-SFT01-10");
            FGBtoSSTSFTMap.put("001-SFT08-11", "001-SFT01-11");
            FGBtoSSTSFTMap.put("001-SFT08-12", "001-SFT01-12");
            FGBtoSSTSFTMap.put("001-SFT08-13", "001-SFT01-13");
            FGBtoSSTSFTMap.put("001-SFT08-14", "001-SFT01-14");
            FGBtoSSTSFTMap.put("001-SFT08-15", "001-SFT01-15");
            FGBtoSSTSFTMap.put("001-SFT08-16", "001-SFT01-16");
            FGBtoSSTSFTMap.put("001-SFT08-17", "001-SFT01-17");
            FGBtoSSTSFTMap.put("001-SFT08-18", "001-SFT01-18");
            FGBtoSSTSFTMap.put("001-SFT08-19", "001-SFT01-19");
            FGBtoSSTSFTMap.put("001-SFT09-00", "001-SFT02-00");
            FGBtoSSTSFTMap.put("001-SFT09-01", "001-SFT02-01");
            FGBtoSSTSFTMap.put("001-SFT09-02", "001-SFT02-02");
            FGBtoSSTSFTMap.put("001-SFT09-03", "001-SFT02-03");
            FGBtoSSTSFTMap.put("001-SFT09-04", "001-SFT02-04");
            FGBtoSSTSFTMap.put("001-SFT09-05", "001-SFT02-05");
            FGBtoSSTSFTMap.put("001-SFT09-06", "001-SFT02-06");
            FGBtoSSTSFTMap.put("001-SFT09-07", "001-SFT02-07");
            FGBtoSSTSFTMap.put("001-SFT09-08", "001-SFT02-08");
            FGBtoSSTSFTMap.put("001-SFT09-09", "001-SFT02-09");
            FGBtoSSTSFTMap.put("001-SFT09-10", "001-SFT02-10");
            FGBtoSSTSFTMap.put("001-SFT09-11", "001-SFT02-11");
            FGBtoSSTSFTMap.put("001-SFT09-12", "001-SFT02-12");
            FGBtoSSTSFTMap.put("001-SFT09-13", "001-SFT02-13");
            FGBtoSSTSFTMap.put("001-SFT09-14", "001-SFT02-14");
            FGBtoSSTSFTMap.put("001-SFT09-15", "001-SFT02-15");
            FGBtoSSTSFTMap.put("001-SFT09-16", "001-SFT02-16");
            FGBtoSSTSFTMap.put("001-SFT09-17", "001-SFT02-17");
            FGBtoSSTSFTMap.put("001-SFT09-18", "001-SFT02-18");
            FGBtoSSTSFTMap.put("001-SFT09-19", "001-SFT02-19");
            FGBtoSSTSFTMap.put("001-SFT10-00", "001-SFT03-00");
            FGBtoSSTSFTMap.put("001-SFT10-01", "001-SFT03-01");
            FGBtoSSTSFTMap.put("001-SFT10-02", "001-SFT03-02");
            FGBtoSSTSFTMap.put("001-SFT10-03", "001-SFT03-03");
            FGBtoSSTSFTMap.put("001-SFT10-04", "001-SFT03-04");
            FGBtoSSTSFTMap.put("001-SFT10-05", "001-SFT03-05");
            FGBtoSSTSFTMap.put("001-SFT10-06", "001-SFT03-06");
            FGBtoSSTSFTMap.put("001-SFT10-07", "001-SFT03-07");
            FGBtoSSTSFTMap.put("001-SFT10-08", "001-SFT03-08");
            FGBtoSSTSFTMap.put("001-SFT10-09", "001-SFT03-09");
            FGBtoSSTSFTMap.put("001-SFT10-10", "001-SFT03-10");
            FGBtoSSTSFTMap.put("001-SFT10-11", "001-SFT03-11");
            FGBtoSSTSFTMap.put("001-SFT10-12", "001-SFT03-12");
            FGBtoSSTSFTMap.put("001-SFT10-13", "001-SFT03-13");
            FGBtoSSTSFTMap.put("001-SFT10-14", "001-SFT03-14");
            FGBtoSSTSFTMap.put("001-SFT10-15", "001-SFT03-15");
            FGBtoSSTSFTMap.put("001-SFT10-16", "001-SFT03-16");
            FGBtoSSTSFTMap.put("001-SFT10-17", "001-SFT03-17");
            FGBtoSSTSFTMap.put("001-SFT10-18", "001-SFT03-18");
            FGBtoSSTSFTMap.put("001-SFT10-19", "001-SFT03-19");
            FGBtoSSTSFTMap.put("001-SFT11-00", "001-SFT04-00");
            FGBtoSSTSFTMap.put("001-SFT11-01", "001-SFT04-01");
            FGBtoSSTSFTMap.put("001-SFT11-02", "001-SFT04-02");
            FGBtoSSTSFTMap.put("001-SFT11-03", "001-SFT04-03");
            FGBtoSSTSFTMap.put("001-SFT11-04", "001-SFT04-04");
            FGBtoSSTSFTMap.put("001-SFT11-05", "001-SFT04-05");
            FGBtoSSTSFTMap.put("001-SFT11-06", "001-SFT04-06");
            FGBtoSSTSFTMap.put("001-SFT11-07", "001-SFT04-07");
            FGBtoSSTSFTMap.put("001-SFT11-08", "001-SFT04-08");
            FGBtoSSTSFTMap.put("001-SFT11-09", "001-SFT04-09");
            FGBtoSSTSFTMap.put("001-SFT11-10", "001-SFT04-10");
            FGBtoSSTSFTMap.put("001-SFT11-11", "001-SFT04-11");
            FGBtoSSTSFTMap.put("001-SFT11-12", "001-SFT04-12");
            FGBtoSSTSFTMap.put("001-SFT11-13", "001-SFT04-13");
            FGBtoSSTSFTMap.put("001-SFT11-14", "001-SFT04-14");
            FGBtoSSTSFTMap.put("001-SFT11-15", "001-SFT04-15");
            FGBtoSSTSFTMap.put("001-SFT11-16", "001-SFT04-16");
            FGBtoSSTSFTMap.put("001-SFT11-17", "001-SFT04-17");
            FGBtoSSTSFTMap.put("001-SFT11-18", "001-SFT04-18");
            FGBtoSSTSFTMap.put("001-SFT11-19", "001-SFT04-19");
            FGBtoSSTSFTMap.put("001-SFT12-00", "001-SFT05-00");
            FGBtoSSTSFTMap.put("001-SFT12-01", "001-SFT05-01");
            FGBtoSSTSFTMap.put("001-SFT12-02", "001-SFT05-02");
            FGBtoSSTSFTMap.put("001-SFT12-03", "001-SFT05-03");
            FGBtoSSTSFTMap.put("001-SFT12-04", "001-SFT05-04");
            FGBtoSSTSFTMap.put("001-SFT12-05", "001-SFT05-05");
            FGBtoSSTSFTMap.put("001-SFT12-06", "001-SFT05-06");
            FGBtoSSTSFTMap.put("001-SFT12-07", "001-SFT05-07");
            FGBtoSSTSFTMap.put("001-SFT12-08", "001-SFT05-08");
            FGBtoSSTSFTMap.put("001-SFT12-09", "001-SFT05-09");
            FGBtoSSTSFTMap.put("001-SFT12-10", "001-SFT05-10");
            FGBtoSSTSFTMap.put("001-SFT12-11", "001-SFT05-11");
            FGBtoSSTSFTMap.put("001-SFT12-12", "001-SFT05-12");
            FGBtoSSTSFTMap.put("001-SFT12-13", "001-SFT05-13");
            FGBtoSSTSFTMap.put("001-SFT12-14", "001-SFT05-14");
            FGBtoSSTSFTMap.put("001-SFT12-15", "001-SFT05-15");
            FGBtoSSTSFTMap.put("001-SFT12-16", "001-SFT05-16");
            FGBtoSSTSFTMap.put("001-SFT12-17", "001-SFT05-17");
            FGBtoSSTSFTMap.put("001-SFT12-18", "001-SFT05-18");
            FGBtoSSTSFTMap.put("001-SFT12-19", "001-SFT05-19");
            FGBtoSSTSFTMap.put("001-SFT13-00", "001-SFT06-00");
            FGBtoSSTSFTMap.put("001-SFT13-01", "001-SFT06-01");
            FGBtoSSTSFTMap.put("001-SFT13-02", "001-SFT06-02");
            FGBtoSSTSFTMap.put("001-SFT13-03", "001-SFT06-03");
            FGBtoSSTSFTMap.put("001-SFT13-04", "001-SFT06-04");
            FGBtoSSTSFTMap.put("001-SFT13-05", "001-SFT06-05");
            FGBtoSSTSFTMap.put("001-SFT13-06", "001-SFT06-06");
            FGBtoSSTSFTMap.put("001-SFT13-07", "001-SFT06-07");
            FGBtoSSTSFTMap.put("001-SFT13-08", "001-SFT06-08");
            FGBtoSSTSFTMap.put("001-SFT13-09", "001-SFT06-09");
            FGBtoSSTSFTMap.put("001-SFT13-10", "001-SFT06-10");
            FGBtoSSTSFTMap.put("001-SFT13-11", "001-SFT06-11");
            FGBtoSSTSFTMap.put("001-SFT13-12", "001-SFT06-12");
            FGBtoSSTSFTMap.put("001-SFT13-13", "001-SFT06-13");
            FGBtoSSTSFTMap.put("001-SFT13-14", "001-SFT06-14");
            FGBtoSSTSFTMap.put("001-SFT13-15", "001-SFT06-15");
            FGBtoSSTSFTMap.put("001-SFT13-16", "001-SFT06-16");
            FGBtoSSTSFTMap.put("001-SFT13-17", "001-SFT06-17");
            FGBtoSSTSFTMap.put("001-SFT13-18", "001-SFT06-18");
            FGBtoSSTSFTMap.put("001-SFT13-19", "001-SFT06-19");
            FGBtoSSTSFTMap.put("001-SFT14-00", "001-SFT07-00");
            FGBtoSSTSFTMap.put("001-SFT14-01", "001-SFT07-01");
            FGBtoSSTSFTMap.put("001-SFT14-02", "001-SFT07-02");
            FGBtoSSTSFTMap.put("001-SFT14-03", "001-SFT07-03");
            FGBtoSSTSFTMap.put("001-SFT14-04", "001-SFT07-04");
            FGBtoSSTSFTMap.put("001-SFT14-05", "001-SFT07-05");
            FGBtoSSTSFTMap.put("001-SFT14-06", "001-SFT07-06");
            FGBtoSSTSFTMap.put("001-SFT14-07", "001-SFT07-07");
            FGBtoSSTSFTMap.put("001-SFT14-08", "001-SFT07-08");
            FGBtoSSTSFTMap.put("001-SFT14-09", "001-SFT07-09");
            FGBtoSSTSFTMap.put("001-SFT14-10", "001-SFT07-10");
            FGBtoSSTSFTMap.put("001-SFT14-11", "001-SFT07-11");
            FGBtoSSTSFTMap.put("001-SFT14-12", "001-SFT07-12");
            FGBtoSSTSFTMap.put("001-SFT14-13", "001-SFT07-13");
            FGBtoSSTSFTMap.put("001-SFT14-14", "001-SFT07-14");
            FGBtoSSTSFTMap.put("001-SFT14-15", "001-SFT07-15");
            FGBtoSSTSFTMap.put("001-SFT14-16", "001-SFT07-16");
            FGBtoSSTSFTMap.put("001-SFT14-17", "001-SFT07-17");
            FGBtoSSTSFTMap.put("001-SFT14-18", "001-SFT07-18");
            FGBtoSSTSFTMap.put("001-SFT14-19", "001-SFT07-19");
            FGBtoSSTSFTMap.put("001-SFT15-00", "001-SFT08-00");
            FGBtoSSTSFTMap.put("001-SFT15-01", "001-SFT08-01");
            FGBtoSSTSFTMap.put("001-SFT15-02", "001-SFT08-02");
            FGBtoSSTSFTMap.put("001-SFT15-03", "001-SFT08-03");
            FGBtoSSTSFTMap.put("001-SFT15-04", "001-SFT08-04");
            FGBtoSSTSFTMap.put("001-SFT15-05", "001-SFT08-05");
            FGBtoSSTSFTMap.put("001-SFT15-06", "001-SFT08-06");
            FGBtoSSTSFTMap.put("001-SFT15-07", "001-SFT08-07");
            FGBtoSSTSFTMap.put("001-SFT15-08", "001-SFT08-08");
            FGBtoSSTSFTMap.put("001-SFT15-09", "001-SFT08-09");
            FGBtoSSTSFTMap.put("001-SFT15-10", "001-SFT08-10");
            FGBtoSSTSFTMap.put("001-SFT15-11", "001-SFT08-11");
            FGBtoSSTSFTMap.put("001-SFT15-12", "001-SFT08-12");
            FGBtoSSTSFTMap.put("001-SFT15-13", "001-SFT08-13");
            FGBtoSSTSFTMap.put("001-SFT15-14", "001-SFT08-14");
            FGBtoSSTSFTMap.put("001-SFT15-15", "001-SFT08-15");
            FGBtoSSTSFTMap.put("001-SFT15-16", "001-SFT08-16");
            FGBtoSSTSFTMap.put("001-SFT15-17", "001-SFT08-17");
            FGBtoSSTSFTMap.put("001-SFT15-18", "001-SFT08-18");
            FGBtoSSTSFTMap.put("001-SFT15-19", "001-SFT08-19");
            FGBtoSSTSFTMap.put("001-SFT16-00", "001-SFT09-00");
            FGBtoSSTSFTMap.put("001-SFT16-01", "001-SFT09-01");
            FGBtoSSTSFTMap.put("001-SFT16-02", "001-SFT09-02");
            FGBtoSSTSFTMap.put("001-SFT16-03", "001-SFT09-03");
            FGBtoSSTSFTMap.put("001-SFT16-04", "001-SFT09-04");
            FGBtoSSTSFTMap.put("001-SFT16-05", "001-SFT09-05");
            FGBtoSSTSFTMap.put("001-SFT16-06", "001-SFT09-06");
            FGBtoSSTSFTMap.put("001-SFT16-07", "001-SFT09-07");
            FGBtoSSTSFTMap.put("001-SFT16-08", "001-SFT09-08");
            FGBtoSSTSFTMap.put("001-SFT16-09", "001-SFT09-09");
            FGBtoSSTSFTMap.put("001-SFT16-10", "001-SFT09-10");
            FGBtoSSTSFTMap.put("001-SFT16-11", "001-SFT09-11");
            FGBtoSSTSFTMap.put("001-SFT16-12", "001-SFT09-12");
            FGBtoSSTSFTMap.put("001-SFT16-13", "001-SFT09-13");
            FGBtoSSTSFTMap.put("001-SFT16-14", "001-SFT09-14");
            FGBtoSSTSFTMap.put("001-SFT16-15", "001-SFT09-15");
            FGBtoSSTSFTMap.put("001-SFT16-16", "001-SFT09-16");
            FGBtoSSTSFTMap.put("001-SFT16-17", "001-SFT09-17");
            FGBtoSSTSFTMap.put("001-SFT16-18", "001-SFT09-18");
            FGBtoSSTSFTMap.put("001-SFT16-19", "001-SFT09-19");
            FGBtoSSTSFTMap.put("001-SFT17-00", "001-SFT10-00");
            FGBtoSSTSFTMap.put("001-SFT17-01", "001-SFT10-01");
            FGBtoSSTSFTMap.put("001-SFT17-02", "001-SFT10-02");
            FGBtoSSTSFTMap.put("001-SFT17-03", "001-SFT10-03");
            FGBtoSSTSFTMap.put("001-SFT17-04", "001-SFT10-04");
            FGBtoSSTSFTMap.put("001-SFT17-05", "001-SFT10-05");
            FGBtoSSTSFTMap.put("001-SFT17-06", "001-SFT10-06");
            FGBtoSSTSFTMap.put("001-SFT17-07", "001-SFT10-07");
            FGBtoSSTSFTMap.put("001-SFT17-08", "001-SFT10-08");
            FGBtoSSTSFTMap.put("001-SFT17-09", "001-SFT10-09");
            FGBtoSSTSFTMap.put("001-SFT17-10", "001-SFT10-10");
            FGBtoSSTSFTMap.put("001-SFT17-11", "001-SFT10-11");
            FGBtoSSTSFTMap.put("001-SFT17-12", "001-SFT10-12");
            FGBtoSSTSFTMap.put("001-SFT17-13", "001-SFT10-13");
            FGBtoSSTSFTMap.put("001-SFT17-14", "001-SFT10-14");
            FGBtoSSTSFTMap.put("001-SFT17-15", "001-SFT10-15");
            FGBtoSSTSFTMap.put("001-SFT17-16", "001-SFT10-16");
            FGBtoSSTSFTMap.put("001-SFT17-17", "001-SFT10-17");
            FGBtoSSTSFTMap.put("001-SFT17-18", "001-SFT10-18");
            FGBtoSSTSFTMap.put("001-SFT17-19", "001-SFT10-19");
            FGBtoSSTSFTMap.put("001-SFT18-00", "001-SFT11-00");
            FGBtoSSTSFTMap.put("001-SFT18-01", "001-SFT11-01");
            FGBtoSSTSFTMap.put("001-SFT18-02", "001-SFT11-02");
            FGBtoSSTSFTMap.put("001-SFT18-03", "001-SFT11-03");
            FGBtoSSTSFTMap.put("001-SFT18-04", "001-SFT11-04");
            FGBtoSSTSFTMap.put("001-SFT18-05", "001-SFT11-05");
            FGBtoSSTSFTMap.put("001-SFT18-06", "001-SFT11-06");
            FGBtoSSTSFTMap.put("001-SFT18-07", "001-SFT11-07");
            FGBtoSSTSFTMap.put("001-SFT18-08", "001-SFT11-08");
            FGBtoSSTSFTMap.put("001-SFT18-09", "001-SFT11-09");
            FGBtoSSTSFTMap.put("001-SFT18-10", "001-SFT11-10");
            FGBtoSSTSFTMap.put("001-SFT18-11", "001-SFT11-11");
            FGBtoSSTSFTMap.put("001-SFT18-12", "001-SFT11-12");
            FGBtoSSTSFTMap.put("001-SFT18-13", "001-SFT11-13");
            FGBtoSSTSFTMap.put("001-SFT18-14", "001-SFT11-14");
            FGBtoSSTSFTMap.put("001-SFT18-15", "001-SFT11-15");
            FGBtoSSTSFTMap.put("001-SFT18-16", "001-SFT11-16");
            FGBtoSSTSFTMap.put("001-SFT18-17", "001-SFT11-17");
            FGBtoSSTSFTMap.put("001-SFT18-18", "001-SFT11-18");
            FGBtoSSTSFTMap.put("001-SFT18-19", "001-SFT11-19");
            FGBtoSSTSFTMap.put("001-SFT19-00", "001-SFT12-00");
            FGBtoSSTSFTMap.put("001-SFT19-01", "001-SFT12-01");
            FGBtoSSTSFTMap.put("001-SFT19-02", "001-SFT12-02");
            FGBtoSSTSFTMap.put("001-SFT19-03", "001-SFT12-03");
            FGBtoSSTSFTMap.put("001-SFT19-04", "001-SFT12-04");
            FGBtoSSTSFTMap.put("001-SFT19-05", "001-SFT12-05");
            FGBtoSSTSFTMap.put("001-SFT19-06", "001-SFT12-06");
            FGBtoSSTSFTMap.put("001-SFT19-07", "001-SFT12-07");
            FGBtoSSTSFTMap.put("001-SFT19-08", "001-SFT12-08");
            FGBtoSSTSFTMap.put("001-SFT19-09", "001-SFT12-09");
            FGBtoSSTSFTMap.put("001-SFT19-10", "001-SFT12-10");
            FGBtoSSTSFTMap.put("001-SFT19-11", "001-SFT12-11");
            FGBtoSSTSFTMap.put("001-SFT19-12", "001-SFT12-12");
            FGBtoSSTSFTMap.put("001-SFT19-13", "001-SFT12-13");
            FGBtoSSTSFTMap.put("001-SFT19-14", "001-SFT12-14");
            FGBtoSSTSFTMap.put("001-SFT19-15", "001-SFT12-15");
            FGBtoSSTSFTMap.put("001-SFT19-16", "001-SFT12-16");
            FGBtoSSTSFTMap.put("001-SFT19-17", "001-SFT12-17");
            FGBtoSSTSFTMap.put("001-SFT19-18", "001-SFT12-18");
            FGBtoSSTSFTMap.put("001-SFT19-19", "001-SFT12-19");
            FGBtoSSTSFTMap.put("001-SFT20-00", "001-SFT13-00");
            FGBtoSSTSFTMap.put("001-SFT20-01", "001-SFT13-01");
            FGBtoSSTSFTMap.put("001-SFT20-02", "001-SFT13-02");
            FGBtoSSTSFTMap.put("001-SFT20-03", "001-SFT13-03");
            FGBtoSSTSFTMap.put("001-SFT20-04", "001-SFT13-04");
            FGBtoSSTSFTMap.put("001-SFT20-05", "001-SFT13-05");
            FGBtoSSTSFTMap.put("001-SFT20-06", "001-SFT13-06");
            FGBtoSSTSFTMap.put("001-SFT20-07", "001-SFT13-07");
            FGBtoSSTSFTMap.put("001-SFT20-08", "001-SFT13-08");
            FGBtoSSTSFTMap.put("001-SFT20-09", "001-SFT13-09");
            FGBtoSSTSFTMap.put("001-SFT20-10", "001-SFT13-10");
            FGBtoSSTSFTMap.put("001-SFT20-11", "001-SFT13-11");
            FGBtoSSTSFTMap.put("001-SFT20-12", "001-SFT13-12");
            FGBtoSSTSFTMap.put("001-SFT20-13", "001-SFT13-13");
            FGBtoSSTSFTMap.put("001-SFT20-14", "001-SFT13-14");
            FGBtoSSTSFTMap.put("001-SFT20-15", "001-SFT13-15");
            FGBtoSSTSFTMap.put("001-SFT20-16", "001-SFT13-16");
            FGBtoSSTSFTMap.put("001-SFT20-17", "001-SFT13-17");
            FGBtoSSTSFTMap.put("001-SFT20-18", "001-SFT13-18");
            FGBtoSSTSFTMap.put("001-SFT20-19", "001-SFT13-19");
            FGBtoSSTSFTMap.put("001-SFT21-00", "001-SFT14-00");
            FGBtoSSTSFTMap.put("001-SFT21-01", "001-SFT14-01");
            FGBtoSSTSFTMap.put("001-SFT21-02", "001-SFT14-02");
            FGBtoSSTSFTMap.put("001-SFT21-03", "001-SFT14-03");
            FGBtoSSTSFTMap.put("001-SFT21-04", "001-SFT14-04");
            FGBtoSSTSFTMap.put("001-SFT21-05", "001-SFT14-05");
            FGBtoSSTSFTMap.put("001-SFT21-06", "001-SFT14-06");
            FGBtoSSTSFTMap.put("001-SFT21-07", "001-SFT14-07");
            FGBtoSSTSFTMap.put("001-SFT21-08", "001-SFT14-08");
            FGBtoSSTSFTMap.put("001-SFT21-09", "001-SFT14-09");
            FGBtoSSTSFTMap.put("001-SFT21-10", "001-SFT14-10");
            FGBtoSSTSFTMap.put("001-SFT21-11", "001-SFT14-11");
            FGBtoSSTSFTMap.put("001-SFT21-12", "001-SFT14-12");
            FGBtoSSTSFTMap.put("001-SFT21-13", "001-SFT14-13");
            FGBtoSSTSFTMap.put("001-SFT21-14", "001-SFT14-14");
            FGBtoSSTSFTMap.put("001-SFT21-15", "001-SFT14-15");
            FGBtoSSTSFTMap.put("001-SFT21-16", "001-SFT14-16");
            FGBtoSSTSFTMap.put("001-SFT21-17", "001-SFT14-17");
            FGBtoSSTSFTMap.put("001-SFT21-18", "001-SFT14-18");
            FGBtoSSTSFTMap.put("001-SFT21-19", "001-SFT14-19");
            FGBtoSSTSFTMap.put("001-SFT22-00", "001-SFT15-00");
            FGBtoSSTSFTMap.put("001-SFT22-01", "001-SFT15-01");
            FGBtoSSTSFTMap.put("001-SFT22-02", "001-SFT15-02");
            FGBtoSSTSFTMap.put("001-SFT22-03", "001-SFT15-03");
            FGBtoSSTSFTMap.put("001-SFT22-04", "001-SFT15-04");
            FGBtoSSTSFTMap.put("001-SFT22-05", "001-SFT15-05");
            FGBtoSSTSFTMap.put("001-SFT22-06", "001-SFT15-06");
            FGBtoSSTSFTMap.put("001-SFT22-07", "001-SFT15-07");
            FGBtoSSTSFTMap.put("001-SFT22-08", "001-SFT15-08");
            FGBtoSSTSFTMap.put("001-SFT22-09", "001-SFT15-09");
            FGBtoSSTSFTMap.put("001-SFT22-10", "001-SFT15-10");
            FGBtoSSTSFTMap.put("001-SFT22-11", "001-SFT15-11");
            FGBtoSSTSFTMap.put("001-SFT22-12", "001-SFT15-12");
            FGBtoSSTSFTMap.put("001-SFT22-13", "001-SFT15-13");
            FGBtoSSTSFTMap.put("001-SFT22-14", "001-SFT15-14");
            FGBtoSSTSFTMap.put("001-SFT22-15", "001-SFT15-15");
            FGBtoSSTSFTMap.put("001-SFT22-16", "001-SFT15-16");
            FGBtoSSTSFTMap.put("001-SFT22-17", "001-SFT15-17");
            FGBtoSSTSFTMap.put("001-SFT22-18", "001-SFT15-18");
            FGBtoSSTSFTMap.put("001-SFT22-19", "001-SFT15-19");
            FGBtoSSTSFTMap.put("001-SFT23-00", "001-SFT16-00");
            FGBtoSSTSFTMap.put("001-SFT23-01", "001-SFT16-01");
            FGBtoSSTSFTMap.put("001-SFT23-02", "001-SFT16-02");
            FGBtoSSTSFTMap.put("001-SFT23-03", "001-SFT16-03");
            FGBtoSSTSFTMap.put("001-SFT23-04", "001-SFT16-04");
            FGBtoSSTSFTMap.put("001-SFT23-05", "001-SFT16-05");
            FGBtoSSTSFTMap.put("001-SFT23-06", "001-SFT16-06");
            FGBtoSSTSFTMap.put("001-SFT23-07", "001-SFT16-07");
            FGBtoSSTSFTMap.put("001-SFT23-08", "001-SFT16-08");
            FGBtoSSTSFTMap.put("001-SFT23-09", "001-SFT16-09");
            FGBtoSSTSFTMap.put("001-SFT23-10", "001-SFT16-10");
            FGBtoSSTSFTMap.put("001-SFT23-11", "001-SFT16-11");
            FGBtoSSTSFTMap.put("001-SFT23-12", "001-SFT16-12");
            FGBtoSSTSFTMap.put("001-SFT23-13", "001-SFT16-13");
            FGBtoSSTSFTMap.put("001-SFT23-14", "001-SFT16-14");
            FGBtoSSTSFTMap.put("001-SFT23-15", "001-SFT16-15");
            FGBtoSSTSFTMap.put("001-SFT23-16", "001-SFT16-16");
            FGBtoSSTSFTMap.put("001-SFT23-17", "001-SFT16-17");
            FGBtoSSTSFTMap.put("001-SFT23-18", "001-SFT16-18");
            FGBtoSSTSFTMap.put("001-SFT23-19", "001-SFT16-19");
            FGBtoSSTSFTMap.put("001-SFT24-00", "001-SFT17-00");
            FGBtoSSTSFTMap.put("001-SFT24-01", "001-SFT17-01");
            FGBtoSSTSFTMap.put("001-SFT24-02", "001-SFT17-02");
            FGBtoSSTSFTMap.put("001-SFT24-03", "001-SFT17-03");
            FGBtoSSTSFTMap.put("001-SFT24-04", "001-SFT17-04");
            FGBtoSSTSFTMap.put("001-SFT24-05", "001-SFT17-05");
            FGBtoSSTSFTMap.put("001-SFT24-06", "001-SFT17-06");
            FGBtoSSTSFTMap.put("001-SFT24-07", "001-SFT17-07");
            FGBtoSSTSFTMap.put("001-SFT24-08", "001-SFT17-08");
            FGBtoSSTSFTMap.put("001-SFT24-09", "001-SFT17-09");
            FGBtoSSTSFTMap.put("001-SFT24-10", "001-SFT17-10");
            FGBtoSSTSFTMap.put("001-SFT24-11", "001-SFT17-11");
            FGBtoSSTSFTMap.put("001-SFT24-12", "001-SFT17-12");
            FGBtoSSTSFTMap.put("001-SFT24-13", "001-SFT17-13");
            FGBtoSSTSFTMap.put("001-SFT24-14", "001-SFT17-14");
            FGBtoSSTSFTMap.put("001-SFT24-15", "001-SFT17-15");
            FGBtoSSTSFTMap.put("001-SFT24-16", "001-SFT17-16");
            FGBtoSSTSFTMap.put("001-SFT24-17", "001-SFT17-17");
            FGBtoSSTSFTMap.put("001-SFT24-18", "001-SFT17-18");
            FGBtoSSTSFTMap.put("001-SFT24-19", "001-SFT17-19");
            FGBtoSSTSFTMap.put("001-SFT25-00", "001-SFT18-00");
            FGBtoSSTSFTMap.put("001-SFT25-01", "001-SFT18-01");
            FGBtoSSTSFTMap.put("001-SFT25-02", "001-SFT18-02");
            FGBtoSSTSFTMap.put("001-SFT25-03", "001-SFT18-03");
            FGBtoSSTSFTMap.put("001-SFT25-04", "001-SFT18-04");
            FGBtoSSTSFTMap.put("001-SFT25-05", "001-SFT18-05");
            FGBtoSSTSFTMap.put("001-SFT25-06", "001-SFT18-06");
            FGBtoSSTSFTMap.put("001-SFT25-07", "001-SFT18-07");
            FGBtoSSTSFTMap.put("001-SFT25-08", "001-SFT18-08");
            FGBtoSSTSFTMap.put("001-SFT25-09", "001-SFT18-09");
            FGBtoSSTSFTMap.put("001-SFT25-10", "001-SFT18-10");
            FGBtoSSTSFTMap.put("001-SFT25-11", "001-SFT18-11");
            FGBtoSSTSFTMap.put("001-SFT25-12", "001-SFT18-12");
            FGBtoSSTSFTMap.put("001-SFT25-13", "001-SFT18-13");
            FGBtoSSTSFTMap.put("001-SFT25-14", "001-SFT18-14");
            FGBtoSSTSFTMap.put("001-SFT25-15", "001-SFT18-15");
            FGBtoSSTSFTMap.put("001-SFT25-16", "001-SFT18-16");
            FGBtoSSTSFTMap.put("001-SFT25-17", "001-SFT18-17");
            FGBtoSSTSFTMap.put("001-SFT25-18", "001-SFT18-18");
            FGBtoSSTSFTMap.put("001-SFT25-19", "001-SFT18-19");
            FGBtoSSTSFTMap.put("001-SFT26-00", "001-SFT19-00");
            FGBtoSSTSFTMap.put("001-SFT26-01", "001-SFT19-01");
            FGBtoSSTSFTMap.put("001-SFT26-02", "001-SFT19-02");
            FGBtoSSTSFTMap.put("001-SFT26-03", "001-SFT19-03");
            FGBtoSSTSFTMap.put("001-SFT26-04", "001-SFT19-04");
            FGBtoSSTSFTMap.put("001-SFT26-05", "001-SFT19-05");
            FGBtoSSTSFTMap.put("001-SFT26-06", "001-SFT19-06");
            FGBtoSSTSFTMap.put("001-SFT26-07", "001-SFT19-07");
            FGBtoSSTSFTMap.put("001-SFT26-08", "001-SFT19-08");
            FGBtoSSTSFTMap.put("001-SFT26-09", "001-SFT19-09");
            FGBtoSSTSFTMap.put("001-SFT26-10", "001-SFT19-10");
            FGBtoSSTSFTMap.put("001-SFT26-11", "001-SFT19-11");
            FGBtoSSTSFTMap.put("001-SFT26-12", "001-SFT19-12");
            FGBtoSSTSFTMap.put("001-SFT26-13", "001-SFT19-13");
            FGBtoSSTSFTMap.put("001-SFT26-14", "001-SFT19-14");
            FGBtoSSTSFTMap.put("001-SFT26-15", "001-SFT19-15");
            FGBtoSSTSFTMap.put("001-SFT26-16", "001-SFT19-16");
            FGBtoSSTSFTMap.put("001-SFT26-17", "001-SFT19-17");
            FGBtoSSTSFTMap.put("001-SFT26-18", "001-SFT19-18");
            FGBtoSSTSFTMap.put("001-SFT26-19", "001-SFT19-19");
            FGBtoSSTSFTMap.put("001-SFT27-00", "001-SFT20-00");
            FGBtoSSTSFTMap.put("001-SFT27-01", "001-SFT20-01");
            FGBtoSSTSFTMap.put("001-SFT27-02", "001-SFT20-02");
            FGBtoSSTSFTMap.put("001-SFT27-03", "001-SFT20-03");
            FGBtoSSTSFTMap.put("001-SFT27-04", "001-SFT20-04");
            FGBtoSSTSFTMap.put("001-SFT27-05", "001-SFT20-05");
            FGBtoSSTSFTMap.put("001-SFT27-06", "001-SFT20-06");
            FGBtoSSTSFTMap.put("001-SFT27-07", "001-SFT20-07");
            FGBtoSSTSFTMap.put("001-SFT27-08", "001-SFT20-08");
            FGBtoSSTSFTMap.put("001-SFT27-09", "001-SFT20-09");
            FGBtoSSTSFTMap.put("001-SFT27-10", "001-SFT20-10");
            FGBtoSSTSFTMap.put("001-SFT27-11", "001-SFT20-11");
            FGBtoSSTSFTMap.put("001-SFT27-12", "001-SFT20-12");
            FGBtoSSTSFTMap.put("001-SFT27-13", "001-SFT20-13");
            FGBtoSSTSFTMap.put("001-SFT27-14", "001-SFT20-14");
            FGBtoSSTSFTMap.put("001-SFT27-15", "001-SFT20-15");
            FGBtoSSTSFTMap.put("001-SFT27-16", "001-SFT20-16");
            FGBtoSSTSFTMap.put("001-SFT27-17", "001-SFT20-17");
            FGBtoSSTSFTMap.put("001-SFT27-18", "001-SFT20-18");
            FGBtoSSTSFTMap.put("001-SFT27-19", "001-SFT20-19");
            FGBtoSSTSFTMap.put("001-SFT28-00", "001-SFT21-00");
            FGBtoSSTSFTMap.put("001-SFT28-01", "001-SFT21-01");
            FGBtoSSTSFTMap.put("001-SFT28-02", "001-SFT21-02");
            FGBtoSSTSFTMap.put("001-SFT28-03", "001-SFT21-03");
            FGBtoSSTSFTMap.put("001-SFT28-04", "001-SFT21-04");
            FGBtoSSTSFTMap.put("001-SFT28-05", "001-SFT21-05");
            FGBtoSSTSFTMap.put("001-SFT28-06", "001-SFT21-06");
            FGBtoSSTSFTMap.put("001-SFT28-07", "001-SFT21-07");
            FGBtoSSTSFTMap.put("001-SFT28-08", "001-SFT21-08");
            FGBtoSSTSFTMap.put("001-SFT28-09", "001-SFT21-09");
            FGBtoSSTSFTMap.put("001-SFT28-10", "001-SFT21-10");
            FGBtoSSTSFTMap.put("001-SFT28-11", "001-SFT21-11");
            FGBtoSSTSFTMap.put("001-SFT28-12", "001-SFT21-12");
            FGBtoSSTSFTMap.put("001-SFT28-13", "001-SFT21-13");
            FGBtoSSTSFTMap.put("001-SFT28-14", "001-SFT21-14");
            FGBtoSSTSFTMap.put("001-SFT28-15", "001-SFT21-15");
            FGBtoSSTSFTMap.put("001-SFT28-16", "001-SFT21-16");
            FGBtoSSTSFTMap.put("001-SFT28-17", "001-SFT21-17");
            FGBtoSSTSFTMap.put("001-SFT28-18", "001-SFT21-18");
            FGBtoSSTSFTMap.put("001-SFT28-19", "001-SFT21-19");
            FGBtoSSTSFTMap.put("001-SFT29-00", "001-SFT22-00");
            FGBtoSSTSFTMap.put("001-SFT29-01", "001-SFT22-01");
            FGBtoSSTSFTMap.put("001-SFT29-02", "001-SFT22-02");
            FGBtoSSTSFTMap.put("001-SFT29-03", "001-SFT22-03");
            FGBtoSSTSFTMap.put("001-SFT29-04", "001-SFT22-04");
            FGBtoSSTSFTMap.put("001-SFT29-05", "001-SFT22-05");
            FGBtoSSTSFTMap.put("001-SFT29-06", "001-SFT22-06");
            FGBtoSSTSFTMap.put("001-SFT29-07", "001-SFT22-07");
            FGBtoSSTSFTMap.put("001-SFT29-08", "001-SFT22-08");
            FGBtoSSTSFTMap.put("001-SFT29-09", "001-SFT22-09");
            FGBtoSSTSFTMap.put("001-SFT29-10", "001-SFT22-10");
            FGBtoSSTSFTMap.put("001-SFT29-11", "001-SFT22-11");
            FGBtoSSTSFTMap.put("001-SFT29-12", "001-SFT22-12");
            FGBtoSSTSFTMap.put("001-SFT29-13", "001-SFT22-13");
            FGBtoSSTSFTMap.put("001-SFT29-14", "001-SFT22-14");
            FGBtoSSTSFTMap.put("001-SFT29-15", "001-SFT22-15");
            FGBtoSSTSFTMap.put("001-SFT29-16", "001-SFT22-16");
            FGBtoSSTSFTMap.put("001-SFT29-17", "001-SFT22-17");
            FGBtoSSTSFTMap.put("001-SFT29-18", "001-SFT22-18");
            FGBtoSSTSFTMap.put("001-SFT29-19", "001-SFT22-19");
            FGBtoSSTSFTMap.put("001-SFT30-00", "001-SFT23-00");
            FGBtoSSTSFTMap.put("001-SFT30-01", "001-SFT23-01");
            FGBtoSSTSFTMap.put("001-SFT30-02", "001-SFT23-02");
            FGBtoSSTSFTMap.put("001-SFT30-03", "001-SFT23-03");
            FGBtoSSTSFTMap.put("001-SFT30-04", "001-SFT23-04");
            FGBtoSSTSFTMap.put("001-SFT30-05", "001-SFT23-05");
            FGBtoSSTSFTMap.put("001-SFT30-06", "001-SFT23-06");
            FGBtoSSTSFTMap.put("001-SFT30-07", "001-SFT23-07");
            FGBtoSSTSFTMap.put("001-SFT30-08", "001-SFT23-08");
            FGBtoSSTSFTMap.put("001-SFT30-09", "001-SFT23-09");
            FGBtoSSTSFTMap.put("001-SFT30-10", "001-SFT23-10");
            FGBtoSSTSFTMap.put("001-SFT30-11", "001-SFT23-11");
            FGBtoSSTSFTMap.put("001-SFT30-12", "001-SFT23-12");
            FGBtoSSTSFTMap.put("001-SFT30-13", "001-SFT23-13");
            FGBtoSSTSFTMap.put("001-SFT30-14", "001-SFT23-14");
            FGBtoSSTSFTMap.put("001-SFT30-15", "001-SFT23-15");
            FGBtoSSTSFTMap.put("001-SFT30-16", "001-SFT23-16");
            FGBtoSSTSFTMap.put("001-SFT30-17", "001-SFT23-17");
            FGBtoSSTSFTMap.put("001-SFT30-18", "001-SFT23-18");
            FGBtoSSTSFTMap.put("001-SFT30-19", "001-SFT23-19");
            FGBtoSSTSFTMap.put("001-SFT31-00", "001-SFT24-00");
            FGBtoSSTSFTMap.put("001-SFT31-01", "001-SFT24-01");
            FGBtoSSTSFTMap.put("001-SFT31-02", "001-SFT24-02");
            FGBtoSSTSFTMap.put("001-SFT31-03", "001-SFT24-03");
            FGBtoSSTSFTMap.put("001-SFT31-04", "001-SFT24-04");
            FGBtoSSTSFTMap.put("001-SFT31-05", "001-SFT24-05");
            FGBtoSSTSFTMap.put("001-SFT31-06", "001-SFT24-06");
            FGBtoSSTSFTMap.put("001-SFT31-07", "001-SFT24-07");
            FGBtoSSTSFTMap.put("001-SFT31-08", "001-SFT24-08");
            FGBtoSSTSFTMap.put("001-SFT31-09", "001-SFT24-09");
            FGBtoSSTSFTMap.put("001-SFT31-10", "001-SFT24-10");
            FGBtoSSTSFTMap.put("001-SFT31-11", "001-SFT24-11");
            FGBtoSSTSFTMap.put("001-SFT31-12", "001-SFT24-12");
            FGBtoSSTSFTMap.put("001-SFT31-13", "001-SFT24-13");
            FGBtoSSTSFTMap.put("001-SFT31-14", "001-SFT24-14");
            FGBtoSSTSFTMap.put("001-SFT31-15", "001-SFT24-15");
            FGBtoSSTSFTMap.put("001-SFT31-16", "001-SFT24-16");
            FGBtoSSTSFTMap.put("001-SFT31-17", "001-SFT24-17");
            FGBtoSSTSFTMap.put("001-SFT31-18", "001-SFT24-18");
            FGBtoSSTSFTMap.put("001-SFT31-19", "001-SFT24-19");

            isInit = true;
        }
    }

    // 电类传感器唯一ID转 监控ID
    public static String ds18b20id2monitorNum(String ds18B20Id) {
        return DS18Id2IdMap.get(ds18B20Id);
    }

    // 环境温度唯一ID转 监控ID
    public static String envid2monitorNum(String environmentid) {
        return EnvironmentIdMap.get(environmentid);
    }

    // 数据包(BJ版本)String转 数据包Map（原生数据，不改动）
    public static Map<String, String> dataPackageToMap(String msg) {
        // 输出Map
        Map<String, String> outMap = new TreeMap<>();
        // 切片
        String[] arr = msg.split("\n");
        // 公有数据
        String time = "1994-02-09 12:13:14";
        String timeMin = "19940209121314";
        String timeHbase = "940209121314";
        String devNum = "000";
        String devNumUnderline = "000-";
        // 存值临时变量
        String value = "0";

        // 电类数据集合
        boolean haveSDT = false;
        Map<String, String> ds18b20Map = new TreeMap<>();
        ds18b20Map.put("001-SDT00-00", "0");
        ds18b20Map.put("001-SDT00-01", "0");
        ds18b20Map.put("001-SDT00-02", "0");
        ds18b20Map.put("001-SDT00-03", "0");
        ds18b20Map.put("001-SDT00-04", "0");
        ds18b20Map.put("001-SDT00-05", "0");
        ds18b20Map.put("001-SDT00-06", "0");
        ds18b20Map.put("001-SDT00-07", "0");
        ds18b20Map.put("001-SDT01-00", "0");
        ds18b20Map.put("001-SDT01-01", "0");
        ds18b20Map.put("001-SDT01-02", "0");
        ds18b20Map.put("001-SDT01-03", "0");
        ds18b20Map.put("001-SDT01-04", "0");
        ds18b20Map.put("001-SDT01-05", "0");
        ds18b20Map.put("001-SDT01-06", "0");
        ds18b20Map.put("001-SDT01-07", "0");
        ds18b20Map.put("001-SDT02-00", "0");
        ds18b20Map.put("001-SDT02-01", "0");
        ds18b20Map.put("001-SDT02-02", "0");
        ds18b20Map.put("001-SDT02-03", "0");
        ds18b20Map.put("001-SDT02-04", "0");
        ds18b20Map.put("001-SDT02-05", "0");
        ds18b20Map.put("001-SDT02-06", "0");
        ds18b20Map.put("001-SDT02-07", "0");
        ds18b20Map.put("001-SDT03-00", "0");
        ds18b20Map.put("001-SDT03-01", "0");
        ds18b20Map.put("001-SDT03-02", "0");
        ds18b20Map.put("001-SDT03-03", "0");
        ds18b20Map.put("001-SDT03-04", "0");
        ds18b20Map.put("001-SDT03-05", "0");
        ds18b20Map.put("001-SDT03-06", "0");
        ds18b20Map.put("001-SDT03-07", "0");
        ds18b20Map.put("001-SDT04-00", "0");
        ds18b20Map.put("001-SDT04-01", "0");
        ds18b20Map.put("001-SDT04-02", "0");
        ds18b20Map.put("001-SDT04-03", "0");
        ds18b20Map.put("001-SDT04-04", "0");
        ds18b20Map.put("001-SDT04-05", "0");
        ds18b20Map.put("001-SDT04-06", "0");
        ds18b20Map.put("001-SDT04-07", "0");
        ds18b20Map.put("001-SDT05-00", "0");
        ds18b20Map.put("001-SDT05-01", "0");
        ds18b20Map.put("001-SDT05-02", "0");
        ds18b20Map.put("001-SDT05-03", "0");
        ds18b20Map.put("001-SDT05-04", "0");
        ds18b20Map.put("001-SDT05-05", "0");
        ds18b20Map.put("001-SDT05-06", "0");
        ds18b20Map.put("001-SDT05-07", "0");
        ds18b20Map.put("001-SDT06-00", "0");
        ds18b20Map.put("001-SDT06-01", "0");
        ds18b20Map.put("001-SDT06-02", "0");
        ds18b20Map.put("001-SDT06-03", "0");
        ds18b20Map.put("001-SDT06-04", "0");
        ds18b20Map.put("001-SDT06-05", "0");
        ds18b20Map.put("001-SDT06-06", "0");
        ds18b20Map.put("001-SDT06-07", "0");
        ds18b20Map.put("001-SDT07-00", "0");
        ds18b20Map.put("001-SDT07-01", "0");
        ds18b20Map.put("001-SDT07-02", "0");
        ds18b20Map.put("001-SDT07-03", "0");
        ds18b20Map.put("001-SDT07-04", "0");
        ds18b20Map.put("001-SDT07-05", "0");
        ds18b20Map.put("001-SDT07-06", "0");
        ds18b20Map.put("001-SDT07-07", "0");

        // 环境温度数据集合
        boolean haveSET = false;
        Map<String, String> envoirmentMap = new TreeMap<>();
        envoirmentMap.put("001-SET00-00", "0");
        envoirmentMap.put("001-SET00-01", "0");
        envoirmentMap.put("001-SET01-00", "0");
        envoirmentMap.put("001-SET01-01", "0");

        boolean haveFBG = false;
        StringBuilder builderSFT = new StringBuilder();
        StringBuilder builderSST = new StringBuilder();

        // 协议解析
        for (String str : arr) {
            // 获取包时间
            if (str.startsWith("@@")) {
                String[] tempdate = str.split(",", -1);
                time = tempdate[1];
                timeMin = time.substring(0, 4) + time.substring(5, 7) + time.substring(8, 10) + time.substring(11, 13) + time.substring(14, 16) + time.substring(17, 19);
                timeHbase = time.substring(2, 4) + time.substring(5, 7) + time.substring(8, 10) + time.substring(11, 13) + time.substring(14, 16) + time.substring(17, 19);
                outMap.put("Time", time);
                outMap.put("TimeMin", timeMin);
                outMap.put("TimeHbase", timeHbase);
            }
            //  获取机床ID
            if (str.startsWith("SDV")) {
                String[] tempdev = str.split(",", -1);
                devNum = tempdev[1];
                devNumUnderline = tempdev[1] + "-";
                outMap.put("devNum", devNum);
                outMap.put("devNum_", devNumUnderline);
            }
            // 获取电类温度
            if (str.startsWith("SDT")) {
                haveSDT = true;
                String[] tempstr = str.split(",", -1);
                // 得到正确监控ID
                String monitorNum = ProtocolUtil.ds18b20id2monitorNum(tempstr[2]);
                if (null != monitorNum) {
                    // 得到 对应温度
                    value = tempstr[3];
                    if ("".equals(value)) {
                        value = "0";
                    }
                    ds18b20Map.put(monitorNum, value);
                }
            }
            // 获取环境温度
            if (str.startsWith("SET")) {
                haveSET = true;
                String[] tempstr = str.split(",", -1);
                // 得到正确监控ID
                String monitorNum = ProtocolUtil.envid2monitorNum(tempstr[2]);
                if (null != monitorNum) {
                    // 得到 对应温度
                    value = tempstr[3];
                    if ("".equals(value)) {
                        value = "0";
                    }
                    envoirmentMap.put(monitorNum, value);
                }
            }
            // 获取FBG温度
            if (str.startsWith("SFT")) {
                haveFBG = true;
                String[] tempstr = str.split(",", -1);
                String monitorNum = devNumUnderline + tempstr[0] + "-" + tempstr[1];
                if ("".equals(tempstr[2]) || "0000.000".equals(tempstr[2])) {
                    value = "0";
                } else {
                    value = tempstr[2];
                }
//				value = ProtocolUtil.waveToTemp(monitorNum, value);
                outMap.put(monitorNum, value);
            }
            // 获取FBG应力
            if (str.startsWith("SST")) {
                haveFBG = true;
                String[] tempstr = str.split(",", -1);
                String monitorNum = devNumUnderline + tempstr[0] + "-" + tempstr[1];
                if ("".equals(tempstr[2]) || "0000.000".equals(tempstr[2])) {
                    value = "0";
                } else {
                    value = tempstr[2];
                }
                outMap.put(monitorNum, value);
            }
            // 获取CCD位移
            if (str.startsWith("SCD")) {
                String[] tempstr = str.split(",", -1);
                for (int i = 0; i < 3; i++) {
                    String name = "";
                    if ("X".equals(tempstr[2 * i + 1])) {
                        name = "00";
                    }
                    if ("Y".equals(tempstr[2 * i + 1])) {
                        name = "01";
                    }
                    if ("Z".equals(tempstr[2 * i + 1])) {
                        name = "02";
                    }
                    String monitorNum = devNumUnderline + tempstr[0] + "-" + name;
                    if ("".equals(tempstr[2 * i + 2])) {
                        value = "0";
                    } else {
                        value = tempstr[2 * i + 2];
                    }
                    outMap.put(monitorNum, value);
                }
            }
            // 获取机床内部信息
            if (str.startsWith("SCN")) {
                String[] tempstr = str.split(",", -1);
                String name = "";
                // 获取XYZM坐标 - 联合
                if ("CH".equals(tempstr[1])) {
                    String monitorNum = devNumUnderline + "POS";
                    value = tempstr[4] + "," + tempstr[6] + "," + tempstr[8] + "," + tempstr[10];
                    outMap.put(monitorNum, value);
                }
                // 获取XYZM坐标 - 分开
                if ("CH".equals(tempstr[1])) {
                    for (int i = 1; i < 5; i++) {
                        if ("XPOS".equals(tempstr[2 * i + 1])) {
                            name = "XPOS";
                        }
                        if ("YPOS".equals(tempstr[2 * i + 1])) {
                            name = "YPOS";
                        }
                        if ("ZPOS".equals(tempstr[2 * i + 1])) {
                            name = "ZPOS";
                        }
                        if ("MAPOS".equals(tempstr[2 * i + 1])) {
                            name = "MAPOS";
                        }
                        String monitorNum = devNumUnderline + name;
                        if ("".equals(tempstr[2 * i + 2])) {
                            value = "0";
                        } else {
                            value = tempstr[2 * i + 2];
                        }
                        outMap.put(monitorNum, value);
                    }
                }
                // 获取XYZ主轴功率 - 数字
                if ("XPWR".equals(tempstr[1])) {
                    for (int i = 0; i < 4; i++) {
                        if ("XPWR".equals(tempstr[2 * i + 1])) {
                            name = "XPWR";
                        }
                        if ("YPWR".equals(tempstr[2 * i + 1])) {
                            name = "YPWR";
                        }
                        if ("ZPWR".equals(tempstr[2 * i + 1])) {
                            name = "ZPWR";
                        }
                        if ("MAPWR".equals(tempstr[2 * i + 1])) {
                            name = "MAPWR";
                        }
                        String monitorNum = devNumUnderline + name;
                        if ("".equals(tempstr[2 * i + 2])) {
                            value = "0";
                        } else {
                            value = tempstr[2 * i + 2];
                        }
                        outMap.put(monitorNum, value);
                    }
                }
                // 获取XYZ主轴功率 - 百分比
                if ("XFU".equals(tempstr[1])) {
                    for (int i = 0; i < 4; i++) {
                        if ("XFU".equals(tempstr[2 * i + 1])) {
                            name = "XFU";
                        }
                        if ("YFU".equals(tempstr[2 * i + 1])) {
                            name = "YFU";
                        }
                        if ("ZFU".equals(tempstr[2 * i + 1])) {
                            name = "ZFU";
                        }
                        if ("MAFU".equals(tempstr[2 * i + 1])) {
                            name = "MAFU";
                        }
                        String monitorNum = devNumUnderline + name;
                        if ("".equals(tempstr[2 * i + 2])) {
                            value = "0";
                        } else {
                            value = tempstr[2 * i + 2];
                        }
                        outMap.put(monitorNum, value);
                    }

                }
                // 获取进给速率\主轴转速\机床状态
                if ("FR".equals(tempstr[1])) {
                    for (int i = 0; i < 3; i++) {
                        if ("FR".equals(tempstr[2 * i + 1])) {
                            name = "FR";
                        }
                        if ("SP".equals(tempstr[2 * i + 1])) {
                            name = "SP";
                        }
                        if ("PA".equals(tempstr[2 * i + 1])) {
                            name = "PA";
                        }
                        String monitorNum = devNumUnderline + name;
                        if ("".equals(tempstr[2 * i + 2])) {
                            value = "0";
                        } else {
                            value = tempstr[2 * i + 2];
                        }
                        outMap.put(monitorNum, value);
                    }
                }

                if ("ERR".equals(tempstr[1])) {
                    String monitorNum = devNumUnderline + "ERR";
                    StringBuilder val = new StringBuilder();
                    for (int i = 2; i < tempstr.length; i++) {
                        if (i != tempstr.length - 1) {
                            val.append(tempstr[i]).append(",");
                        } else {
                            val.append(tempstr[i]);
                        }
                    }
                    outMap.put(monitorNum, val.toString());
                }

            }
        } // for结束

        // 构造FBG集合
        if (haveFBG) {
            for (String key : outMap.keySet()) {
                if (key.length() > 9 && "SST".equals(key.substring(4, 7))) {
                    builderSST.append(outMap.get(key)).append(",");
                }
                if (key.length() > 9 && "SFT".equals(key.substring(4, 7))) {
                    builderSFT.append(outMap.get(key)).append(",");
                }
            }
            builderSST.append(builderSFT);
            String allFBG = new String(builderSST);
            outMap.put("FBGALL", allFBG);
            waveFix(outMap.get("FBGALL"), outMap);
        }

        // DS18B20 数据统一放入
        if (haveSDT) {
            for (String key : ds18b20Map.keySet()) {
                outMap.put(key, ds18b20Map.get(key));
            }
        }

        // 环境温度 数据统一放入
        if (haveSET) {
            for (String key : envoirmentMap.keySet()) {
                outMap.put(key, envoirmentMap.get(key));
            }
        }

        return outMap;
    }

    // 数据包(BJ版本)String转 packLinkMap(设备地址键值对)
    public static Map<String, ChannelHandlerContext> dataPackageMapToPackLinkMap(String dataPackage, ChannelHandlerContext ctx) {
        String[] msgarr = dataPackage.split("\n");
        Map<String, ChannelHandlerContext> packLinkMap = new HashMap<>();
        if (msgarr[1].startsWith("SDV") && !(msgarr[2].startsWith("SCN"))) {
            String mNumber = msgarr[1].split(",")[1];
            // 根据标号和设备号存地址
            if (msgarr[2].startsWith("SDT")) {
                packLinkMap.put("SDV-" + mNumber, ctx);
            } else if (msgarr[2].startsWith("SET")) {
                packLinkMap.put("SET-" + mNumber, ctx);
            }
        }
        return packLinkMap;
    }

    // 数据包(xml版本)mapData转 数据包Map（原生数据，不改动）
    public static Map<String, String> xmlPackageToMap(Map<String, String> mapData) {
        Map<String, String> dataMap = new TreeMap<>();
        for (String akey : mapData.keySet()) {
            // 空key进不去map
            String key;
            String value = mapData.get(akey);
            // DS18B20数据(机床上、环境温度)
            if (akey.contains("/DSB/ID")) {
                String devNum = akey.substring(3, 6);
                String ds18b20ID = akey.substring(13, akey.length());
                String monitorID = DS18B20IdMap.get(ds18b20ID);
                if (monitorID != null) {
                    key = devNum + monitorID;
                    dataMap.put(key, value);
                }
                if (monitorID == null) {
                    System.out.println("没有的ID：" + ds18b20ID);
                }
            }
            // FBG数据(SFT、SST)
            if (akey.contains("/FBG/CH")) {
                String devNum = akey.substring(3, 6);
                String fbgID = akey.replace("/FBG/CH", "-SFT");
                // fbgID = -SFT01-01
                fbgID = fbgID.substring(6, fbgID.length());
                int ch = Integer.valueOf(fbgID.substring(4, 6));
                int index = Integer.valueOf(fbgID.substring(7, 9));
                ch = ch - 1;
                index = index - 1;
                // fbgID = -SST00-00
                fbgID = fbgID.substring(0, 4) + String.format("%02d", ch) + "-" + String.format("%02d", index);
                fbgID = FGBtoSSTSFTIdMap.get(fbgID);
                if (fbgID != null) {
                    key = devNum + fbgID;
                    dataMap.put(key, value);
                }
            }
            // CCD数据
            if (akey.contains("/CCD/")) {
                key = akey.replace("/CCD/", "-SCD-");
                key = key.replace("DEV", "");
                key = key.replace("-X", "-00");
                key = key.replace("-Y", "-01");
                key = key.replace("-Z", "-02");
                dataMap.put(key, value);
            }
            // CNC数据
            if (akey.contains("/CNC/")) {
                key = akey.replace("/CNC/", "-SCN-");
                key = key.replace("DEV", "");
                dataMap.put(key, value);
            }
        }
        return dataMap;
    }

    // 数据包Map转 SensorMap（只有传感器、异常值处理、FBG换算成应力或温度）
    public static Map<String, String> dataPackageMapToSensorMap(Map<String, String> dataPackageMap) {
        Map<String, String> showSensorMap = new TreeMap<>();
        for (String monitorNum : dataPackageMap.keySet()) {
            // 只把传感器数据放到传感器Map
            if (monitorNum.length() > 8 &&
                    ("SCD".equals(monitorNum.substring(4, 7)) ||
                            "SDT".equals(monitorNum.substring(4, 7)) ||
                            "SFT".equals(monitorNum.substring(4, 7)) ||
                            "SST".equals(monitorNum.substring(4, 7)) ||
                            "SET".equals(monitorNum.substring(4, 7))
                    )
                    ) {
                String value = dataPackageMap.get(monitorNum);
                // 波长转温度
                if ("SFT".equals(monitorNum.substring(4, 7))) {
                    value = ProtocolUtil.waveToTemp(monitorNum, dataPackageMap.get(monitorNum));
                    // 异常值归零
                    if (Double.parseDouble(value) < 0 || Double.parseDouble(value) > 100) {
                        value = "0";
                    }
                }
                // 异常值归零
                if ("-nan".equals(value) || "inf".equals(value) || ".00".equals(value) || "0.0".equals(value) || "0.000".equals(value)) {
                    value = "0";
                }
                // 写入输出传感器map
                showSensorMap.put(monitorNum, value);
            }
        }
        return showSensorMap;
    }

    // 数据包Map转 CncMap（只有机床内部信息）
    public static Map<String, String> dataPackageMapToCncMap(Map<String, String> dataPackageMap) {
        Map<String, String> showCncMap = new TreeMap<>();
        for (String monitorNum : dataPackageMap.keySet()) {
            // 只把CNC数据放到传感器Map
            if (monitorNum.length() > 8 && "SCN".equals(monitorNum.substring(4, 7))) {
                String value = dataPackageMap.get(monitorNum);
                // ID去除 -SCN-
                String key = monitorNum.replace("-SCN-", "-");
                // 写入输出CncMap
                showCncMap.put(key, value);
            }
        }
        return showCncMap;
    }

    // 数据包Map转 HbaseMap（传感器、机床数据整理为HBase键值对）  暂不支持一个包中有两种dev的数据
    public static Map<String, String> dataPackageMapToHbaseMap(String time, Map<String, String> dataPackageMap) {
        Map<String, String> hbaseSaveMap = new HashMap<>();
        // 获取Hbase时间，time=20171106202122345
        String hbaseTime = time.substring(2, 14);
        // 获取设备id
        boolean getedDevNum = false;
        String devNum = "00";

        // 判断每类数据是否存在
        boolean haveSDT = false;
        boolean haveSFT = false;
        boolean haveSST = false;
        boolean haveSCD = false;
        boolean haveSCN = false;
        boolean haveSET = false;

        // 构造HBase数据
        List<String> cdList = new ArrayList<>();
        List<String> ftList = new ArrayList<>();
        List<String> stList = new ArrayList<>();
        // 电类128个
        String[] dtArray = new String[128];
        for (int i = 0; i < dtArray.length; i++) {
            dtArray[i] = "0";
        }
        // 环境4个
        String[] etArray = new String[4];
        for (int i = 0; i < etArray.length; i++) {
            etArray[i] = "0";
        }
        // 机床16个
        String[] cnArray = new String[16];
        for (int i = 0; i < cnArray.length; i++) {
            cnArray[i] = "0";
        }

        // 遍历赋值
        for (String akey : dataPackageMap.keySet()) {
            String value = dataPackageMap.get(akey);
            if (!getedDevNum) {
                devNum = akey.substring(1, 3);
                getedDevNum = true;
            }
            // CCD 顺序排一般没问题
            if (akey.contains("SCD") && akey.length() == 10) {
                haveSCD = true;
                cdList.add(value);
            }
            // FBG温度 顺序排一般没问题
            if (akey.contains("SFT") && akey.length() == 12) {
                haveSFT = true;
                ftList.add(value);
            }
            // FBG应力 顺序排一般没问题
            if (akey.contains("SST") && akey.length() == 12) {
                haveSST = true;
                stList.add(value);
            }
            // CNC 特殊顺序排序
            if (akey.contains("SCN")) {
                haveSCN = true;
                if (akey.contains("CH")) {
                    cnArray[0] = value;
                }
                if (akey.contains("XPOS")) {
                    cnArray[1] = value;
                }
                if (akey.contains("YPOS")) {
                    cnArray[2] = value;
                }
                if (akey.contains("ZPOS")) {
                    cnArray[3] = value;
                }
                if (akey.contains("MAPOS")) {
                    cnArray[4] = value;
                }
                if (akey.contains("FR")) {
                    cnArray[5] = value;
                }
                if (akey.contains("SP")) {
                    cnArray[6] = value;
                }
                if (akey.contains("XPWR")) {
                    cnArray[7] = value;
                }
                if (akey.contains("YPWR")) {
                    cnArray[8] = value;
                }
                if (akey.contains("ZPWR")) {
                    cnArray[9] = value;
                }
                if (akey.contains("MAPWR")) {
                    cnArray[10] = value;
                }
                if (akey.contains("XFU")) {
                    cnArray[11] = value;
                }
                if (akey.contains("YFU")) {
                    cnArray[12] = value;
                }
                if (akey.contains("ZFU")) {
                    cnArray[13] = value;
                }
                if (akey.contains("MAFU")) {
                    cnArray[14] = value;
                }
                if (akey.contains("PA")) {
                    cnArray[15] = value;
                }
            }
            // 电类 要保证每个传感器占位
            if (akey.contains("SDT") && akey.length() == 12) {
                haveSDT = true;
                int ch = Integer.valueOf(akey.substring(7, 9));
                int index = Integer.valueOf(akey.substring(10, 12));
                if (ch * 8 + index < dtArray.length) {
                    dtArray[ch * 8 + index] = value;
                }
            }
            // 环境 要保证每个传感器占位
            if (akey.contains("SET") && akey.length() == 12) {
                haveSET = true;
                int ch = Integer.valueOf(akey.substring(7, 9));
                int index = Integer.valueOf(akey.substring(10, 12));
                if (ch * 2 + index < etArray.length) {
                    etArray[ch * 2 + index] = value;
                }
            }
        }

        // 逗号间隔合并
        String cdValue = StringUtils.join(cdList.toArray(), ",");
        String ftValue = StringUtils.join(ftList.toArray(), ",");
        String stValue = StringUtils.join(stList.toArray(), ",");
        String etValue = StringUtils.join(etArray, ",");
        String dtValue = StringUtils.join(dtArray, ",");
        String cnValue = StringUtils.join(cnArray, ",");
        // 0值简化 补充最后逗号
        cdValue = cdValue.replace("0.000000", "0");
        cdValue += ",";
        etValue += ",";
        dtValue += ",";
        cnValue = cnValue.replace("0.0000000000", "0");
        cnValue = cnValue.replace("0.000000", "0");
        cnValue = cnValue.replace("0.0000", "0");
        cnValue += ",";

        // 写入HbaseMap
        if (haveSCD && cdList.size() >= 3) {
            hbaseSaveMap.put(devNum + "CD" + hbaseTime, cdValue);
        }
        if (haveSFT && ftList.size() >= 500) {
            hbaseSaveMap.put(devNum + "FT" + hbaseTime, ftValue);
        }
        if (haveSST && stList.size() >= 140) {
            hbaseSaveMap.put(devNum + "ST" + hbaseTime, stValue);
        }
        if (haveSET) {
            hbaseSaveMap.put(devNum + "ET" + hbaseTime, etValue);
        }
        if (haveSDT) {
            hbaseSaveMap.put(devNum + "DT" + hbaseTime, dtValue);
        }
        if (haveSCN) {
            hbaseSaveMap.put(devNum + "CN" + hbaseTime, cnValue);
        }
        return hbaseSaveMap;
    }

    // showSensorMap转SDTMap、SFTMap、SETMap
    public static void showSensorMapToSDTSFTSETMap(Map<String, String> showSensorMap, Map<String, String> sdtMap,
                                                   Map<String, String> sftMap, Map<String, String> setMap) {
        // 【传感器合并数据给虚拟机床】
        for (String monitorNum : showSensorMap.keySet()) {
            if (monitorNum.length() > 9 && "-SDT".equals(monitorNum.substring(3, 7))) {
                sdtMap.put(monitorNum, showSensorMap.get(monitorNum));
            }
            if (monitorNum.length() > 9 && "-SFT".equals(monitorNum.substring(3, 7))) {
                sftMap.put(monitorNum, showSensorMap.get(monitorNum));
            }
            if (monitorNum.length() > 9 && "-SET".equals(monitorNum.substring(3, 7))) {
                setMap.put(monitorNum, showSensorMap.get(monitorNum));
            }
        }
    }

    // 虚拟机床上显示传感器数据
    public static void virtualCNCDataShow(Map<String, String> sdtMap, Map<String, String> sftMap, Map<String, String> cncMap, PollWebSocketServlet webSocketServlet) throws ParseException {
        Map<String, String> combineMap = new HashMap<>(sftMap);
        virtualCNCDataSDTaddSFT(sdtMap, combineMap);
        SendMessageUtil.sendMessage("CFlower", combineMap, webSocketServlet);
        String[] cncPos = {"0", "0", "0", "0"};
        for (String akey : cncMap.keySet()) {
            if (akey.contains("XPOS")) {
                cncPos[0] = cncMap.get(akey);
            }
            if (akey.contains("YPOS")) {
                cncPos[1] = cncMap.get(akey);
            }
            if (akey.contains("ZPOS")) {
                cncPos[2] = cncMap.get(akey);
            }
            if (akey.contains("MAPOS")) {
                cncPos[3] = cncMap.get(akey);
            }
        }
        String value = StringUtils.join(cncPos, ",");
        // TODO 改为动态ID
        SendMessageUtil.sendMessage(getNowTimeS(), "001-POS", value, webSocketServlet);
    }

    // 波长转温度算法-适用于武重热误差机床（2017年6月3日 新算法） 监测ID 对应的波长 转换出的温度(字符串形式)
    public static String waveToTemp(String monitorNum, String wave) {
        if (IdWaveMap.get(monitorNum) == null) {
            return "0";
        } else {
            double outTemp = 0;
            double waveFloat = Double.parseDouble(wave);
            // 立柱特殊，40pm每°C  真实温度 = 95.2381*(输入波长 - 参考波长)
            if (monitorNum.contains("SFT13") || monitorNum.contains("SFT14") ||
                    monitorNum.contains("SFT15") || monitorNum.contains("SFT16") ||
                    monitorNum.contains("SFT17") || monitorNum.contains("SFT18") || monitorNum.contains("SFT24")) {
                outTemp = 25 * (waveFloat - IdWaveMap.get(monitorNum));
            } else {
                outTemp = 95.2381 * (waveFloat - IdWaveMap.get(monitorNum));
            }
            // 构造方法的字符格式这里如果小数不足2位, 会以0补足
            DecimalFormat decimalFormat = new DecimalFormat(".00");
            return decimalFormat.format(outTemp);
        }
    }

    // 波长修复对齐算法-核心 in:待修复的一个通道的波长数组 标定时正确的波长段 out:修复好的一个通道的波长数组
    public static double[] waveFixCore(double[] input, double[] standWave) {
        double[] output = new double[20];
        for (int i = 0; i != standWave.length; ++i) {
            for (int j = 0; j != input.length; ++j) {
                // 找波长比标定时数据大的，并且差值小于1.75（166多度以内）
                if ((input[j] - standWave[i]) >= 0 && (input[j] - standWave[i]) <= 1.75) {
                    // 这个数就放在index处
                    output[i] = input[j];
                    break;
                } else {
                    output[i] = 0;
                }
            }
        }
        return output;
    }

    // 波长修复对齐算法-用户调用
    public static void waveFix(String input, Map<String, String> outMap) {
        String[] arr = input.split(",");

        double[][] ch = new double[32][20];
        double[][] chFix = new double[32][20];
        int cont = 0;
        // 不包括 ",," 说明数据是好的，可以转double
        if (!input.contains(",,")) {
            // 数据分散到通道
            for (int i = 0; i < 32; ++i) {
                for (int j = 0; j < 20; ++j) {
                    ch[i][j] = Double.valueOf(arr[cont++]);
                }
            }
        }

        // 修复每个通道
        chFix[0] = waveFixCore(ch[0], standWave01);
        chFix[1] = waveFixCore(ch[1], standWave02);
        chFix[2] = waveFixCore(ch[2], standWave03);
        chFix[3] = waveFixCore(ch[3], standWave04);
        chFix[4] = waveFixCore(ch[4], standWave05);
        chFix[5] = waveFixCore(ch[5], standWave06);
        chFix[6] = waveFixCore(ch[6], standWave07);
        chFix[7] = waveFixCore(ch[7], standWave08);
        chFix[8] = waveFixCore(ch[8], standWave09);
        chFix[9] = waveFixCore(ch[9], standWave10);
        chFix[10] = waveFixCore(ch[10], standWave11);
        chFix[11] = waveFixCore(ch[11], standWave12);
        chFix[12] = waveFixCore(ch[12], standWave13);
        chFix[13] = waveFixCore(ch[13], standWave14);
        chFix[14] = waveFixCore(ch[14], standWave15);
        chFix[15] = waveFixCore(ch[15], standWave16);
        chFix[16] = waveFixCore(ch[16], standWave17);
        chFix[17] = waveFixCore(ch[17], standWave18);
        chFix[18] = waveFixCore(ch[18], standWave19);
        chFix[19] = waveFixCore(ch[19], standWave20);
        chFix[20] = waveFixCore(ch[20], standWave21);
        chFix[21] = waveFixCore(ch[21], standWave22);
        chFix[22] = waveFixCore(ch[22], standWave23);
        chFix[23] = waveFixCore(ch[23], standWave24);
        chFix[24] = waveFixCore(ch[24], standWave25);
        chFix[25] = waveFixCore(ch[25], standWave26);
        chFix[26] = waveFixCore(ch[26], standWave27);
        chFix[27] = waveFixCore(ch[27], standWave28);
        chFix[28] = waveFixCore(ch[28], standWave29);
        chFix[29] = waveFixCore(ch[29], standWave30);
        chFix[30] = waveFixCore(ch[30], standWave31);
        chFix[31] = waveFixCore(ch[31], standWave32);
        // 打印测试
//		for(int i=0;i<32;++i)
//			for (int j=0;j<20;++j)
//				System.out.println(CH[i][j]+"	"+CHFix[i][j]);

        String devNumUnderline = outMap.get("devNum_");
        // 应力
        for (int i = 0; i < 7; ++i) {
            for (int j = 0; j < 20; ++j) {
                outMap.put(devNumUnderline + "SST" + String.format("%02d-", i) + String.format("%02d", j), String.format("%.3f", chFix[i][j]));
            }
        }
        // 温度
        for (int i = 7; i < 25; ++i) {
            for (int j = 0; j < 20; ++j) {
                outMap.put(devNumUnderline + "SFT" + String.format("%02d-", i - 7) + String.format("%02d", j), String.format("%.3f", chFix[i][j]));
            }
        }

        // 合并FBGALL
        StringBuilder builderSFT = new StringBuilder();
        StringBuilder builderSST = new StringBuilder();
        for (String key : outMap.keySet()) {
            if (key.length() > 9 && "SST".equals(key.substring(4, 7))) {
                builderSST.append(outMap.get(key)).append(",");
            }
            if (key.length() > 9 && "SFT".equals(key.substring(4, 7))) {
                builderSFT.append(outMap.get(key)).append(",");
            }
        }
        builderSST.append(builderSFT);
        String allFBG = new String(builderSST);
        outMap.put("FBGALL", allFBG);
    }

    // 波长修复对齐算法-用户调用-只是SST
    public static String waveFixSST(String input) {
        String[] arr = input.split(",");

        double[][] ch = new double[7][20];
        double[][] chFix = new double[7][20];
        int cont = 0;
        // 不包括 ",," 说明数据是好的，可以转double
        if (!input.contains(",,")) {
            // 数据分散到通道
            for (int i = 0; i < 7; ++i) {
                for (int j = 0; j < 20; ++j) {
                    ch[i][j] = Double.valueOf(arr[cont++]);
                }
            }
        }
        // 修复每个通道
        chFix[0] = waveFixCore(ch[0], standWave01);
        chFix[1] = waveFixCore(ch[1], standWave02);
        chFix[2] = waveFixCore(ch[2], standWave03);
        chFix[3] = waveFixCore(ch[3], standWave04);
        chFix[4] = waveFixCore(ch[4], standWave05);
        chFix[5] = waveFixCore(ch[5], standWave06);
        chFix[6] = waveFixCore(ch[6], standWave07);

        StringBuilder builderSST = new StringBuilder();

        // 应力
        for (int i = 0; i < 7; ++i) {
            for (int j = 0; j < 20; ++j) {
                builderSST.append(String.format("%.3f", chFix[i][j])).append(",");
            }
        }

        // 处理0.000转0节省空间
        String outResult = new String(builderSST);
        outResult = outResult.replace("0.000", "0");
        return outResult;
    }

    // 波长修复对齐算法-用户调用-只是SFT
    public static String waveFixSFT(String input) {
        String[] arr = input.split(",");

        double[][] ch = new double[25][20];
        double[][] chFix = new double[25][20];
        int cont = 0;
        // 不包括 ",," 说明数据是好的，可以转double
        if (!input.contains(",,")) {
            // 数据分散到通道
            for (int i = 0; i < 25; ++i) {
                for (int j = 0; j < 20; ++j) {
                    ch[i][j] = Double.valueOf(arr[cont++]);
                }
            }
        }
        // 修复每个通道
        chFix[0] = waveFixCore(ch[0], standWave08);
        chFix[1] = waveFixCore(ch[1], standWave09);
        chFix[2] = waveFixCore(ch[2], standWave10);
        chFix[3] = waveFixCore(ch[3], standWave11);
        chFix[4] = waveFixCore(ch[4], standWave12);
        chFix[5] = waveFixCore(ch[5], standWave13);
        chFix[6] = waveFixCore(ch[6], standWave14);
        chFix[7] = waveFixCore(ch[7], standWave15);
        chFix[8] = waveFixCore(ch[8], standWave16);
        chFix[9] = waveFixCore(ch[9], standWave17);
        chFix[10] = waveFixCore(ch[10], standWave18);
        chFix[11] = waveFixCore(ch[11], standWave19);
        chFix[12] = waveFixCore(ch[12], standWave20);
        chFix[13] = waveFixCore(ch[13], standWave21);
        chFix[14] = waveFixCore(ch[14], standWave22);
        chFix[15] = waveFixCore(ch[15], standWave23);
        chFix[16] = waveFixCore(ch[16], standWave24);
        chFix[17] = waveFixCore(ch[17], standWave25);
        chFix[18] = waveFixCore(ch[18], standWave26);
        chFix[19] = waveFixCore(ch[19], standWave27);
        chFix[20] = waveFixCore(ch[20], standWave28);
        chFix[21] = waveFixCore(ch[21], standWave29);
        chFix[22] = waveFixCore(ch[22], standWave30);
        chFix[23] = waveFixCore(ch[23], standWave31);
        chFix[24] = waveFixCore(ch[24], standWave32);

        StringBuilder builderSFT = new StringBuilder();

        // 温度
        for (int i = 0; i < 25; ++i) {
            for (int j = 0; j < 20; ++j) {
                builderSFT.append(String.format("%.3f", chFix[i][j])).append(",");
            }
        }

        // 处理0.000转0节省空间
        String outResult = new String(builderSFT);
        outResult = outResult.replace("0.000", "0");
        return outResult;
    }

}
